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 ba95e18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 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,7 @@ describe('DELETE /api/folder/:id', () => {
},
});

expect(response.body).toEqual('');
expect(response.statusCode).toBe(204);

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 ba95e18

Please sign in to comment.