Skip to content

Commit b72afcc

Browse files
committed
fix: improve return role service
1 parent 2efc4b7 commit b72afcc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/controllers/Role/controller.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import RoleService from 'controllers/Role/service'
88
routes.get(
99
'/role',
1010
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 })
11+
const data = await RoleService.getAll(req)
12+
const buildResponse = BuildResponse.get(data)
1313

1414
return res.status(200).json(buildResponse)
1515
})

0 commit comments

Comments
 (0)