Skip to content

Commit

Permalink
#9 - Added changes according to feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders164a committed Oct 4, 2023
1 parent 31c9005 commit 13f406e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/item/folder/__test__/delete.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions src/modules/item/folder/folder.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 13f406e

Please sign in to comment.