Skip to content

Commit

Permalink
Merge pull request #24 from copilot-platforms/fixes-2
Browse files Browse the repository at this point in the history
fix: settings data structure
  • Loading branch information
sazanrjb authored Feb 27, 2024
2 parents dbfbe8c + 5549043 commit 4d0b62b
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 4d0b62b

Please sign in to comment.