(errorCode: string | undefined)
| 15 | const logger = createLogger('FoldersAPI') |
| 16 | |
| 17 | function folderMutationStatus(errorCode: string | undefined): number { |
| 18 | if (errorCode === 'validation') return 400 |
| 19 | if (errorCode === 'conflict') return 409 |
| 20 | if (errorCode === 'not_found') return 404 |
| 21 | return 500 |
| 22 | } |
| 23 | |
| 24 | // GET - Fetch folders for a workspace |
| 25 | export const GET = withRouteHandler(async (request: NextRequest) => { |