Skip to content

Commit

Permalink
fix: settings data structure
Browse files Browse the repository at this point in the history
  • Loading branch information
aatbip committed Feb 27, 2024
1 parent dbfbe8c commit 5549043
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions src/app/api/settings/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,7 @@ export async function GET(request: NextRequest) {
const settingService = new SettingService()
const setting = await settingService.findByWorkspaceId(payload.workspaceId)

const defaultSetting = {
content: '',
backgroundColor: '#ffffff',
id: '',
bannerImage: {
id: '',
url: '',
filename: '',
contentType: '',
size: 0,
createdById: '',
},
createdById: '',
workspaceId: '',
}

return NextResponse.json({ data: setting || defaultSetting })
return NextResponse.json({ data: setting || null })
}

export async function PUT(request: NextRequest) {
Expand Down

0 comments on commit 5549043

Please sign in to comment.