We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2efc4b7 commit b72afccCopy full SHA for b72afcc
src/controllers/Role/controller.ts
@@ -8,8 +8,8 @@ import RoleService from 'controllers/Role/service'
8
routes.get(
9
'/role',
10
asyncHandler(async function getAll(req: Request, res: Response) {
11
- const { message, data, total } = await RoleService.getAll(req)
12
- const buildResponse = BuildResponse.get({ message, data, total })
+ const data = await RoleService.getAll(req)
+ const buildResponse = BuildResponse.get(data)
13
14
return res.status(200).json(buildResponse)
15
})
0 commit comments