diff --git a/src/modules/item/folder/__test__/delete.test.ts b/src/modules/item/folder/__test__/delete.test.ts index 91d9785..927c5c9 100644 --- a/src/modules/item/folder/__test__/delete.test.ts +++ b/src/modules/item/folder/__test__/delete.test.ts @@ -49,7 +49,8 @@ describe('DELETE /api/folder/:id', () => { }, }); - expect(response.body).toEqual(''); + expect(response.statusCode).toBe(204); + expect(response.body).toBe(''); await expect(folderService.getByItemId(folder.id)).rejects.toThrowError(); await expect(itemService.getById(folder.id)).rejects.toThrowError(); diff --git a/src/modules/item/folder/folder.controller.ts b/src/modules/item/folder/folder.controller.ts index 2f61f2b..f2fa6da 100644 --- a/src/modules/item/folder/folder.controller.ts +++ b/src/modules/item/folder/folder.controller.ts @@ -105,6 +105,7 @@ export default class FolderController { } await this.folderService.deleteFolderByItemId(request.params.id); + return reply.code(204).send(); } catch (e) { if (e instanceof Error) { return reply.badRequest(request.i18n.t(e.message));