Skip to content

Commit

Permalink
fix: wording function controller
Browse files Browse the repository at this point in the history
  • Loading branch information
masb0ymas committed Feb 26, 2021
1 parent 87768f1 commit 1839fdb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/controllers/Role/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ routes.put(
routes.post(
'/role/multiple/soft-delete',
Authorization,
asyncHandler(async function createData(req: Request, res: Response) {
asyncHandler(async function multipleSoftDelete(req: Request, res: Response) {
const formData = req.getBody()
const arrayIds = arrayFormatter(formData.ids)

Expand All @@ -126,7 +126,7 @@ routes.post(
routes.post(
'/role/multiple/restore',
Authorization,
asyncHandler(async function createData(req: Request, res: Response) {
asyncHandler(async function multipleRestore(req: Request, res: Response) {
const formData = req.getBody()
const arrayIds = arrayFormatter(formData.ids)

Expand All @@ -140,7 +140,7 @@ routes.post(
routes.post(
'/role/multiple/force-delete',
Authorization,
asyncHandler(async function createData(req: Request, res: Response) {
asyncHandler(async function multipleForceDelete(req: Request, res: Response) {
const formData = req.getBody()
const arrayIds = arrayFormatter(formData.ids)

Expand All @@ -154,7 +154,7 @@ routes.post(
routes.delete(
'/role/delete/:id',
Authorization,
asyncHandler(async function deleteData(req: Request, res: Response) {
asyncHandler(async function softDelete(req: Request, res: Response) {
const { id } = req.getParams()

await RoleService.delete(id)
Expand All @@ -167,7 +167,7 @@ routes.delete(
routes.put(
'/role/restore/:id',
Authorization,
asyncHandler(async function deleteData(req: Request, res: Response) {
asyncHandler(async function restore(req: Request, res: Response) {
const { id } = req.getParams()

await RoleService.restore(id)
Expand All @@ -180,7 +180,7 @@ routes.put(
routes.delete(
'/role/:id',
Authorization,
asyncHandler(async function deleteData(req: Request, res: Response) {
asyncHandler(async function forceDelete(req: Request, res: Response) {
const { id } = req.getParams()

await RoleService.delete(id, true)
Expand Down
12 changes: 6 additions & 6 deletions src/controllers/User/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ routes.put(
routes.post(
'/user/multiple/soft-delete',
Authorization,
asyncHandler(async function createData(req: Request, res: Response) {
asyncHandler(async function multipleSoftDelete(req: Request, res: Response) {
const formData = req.getBody()
const arrayIds = arrayFormatter(formData.ids)

Expand All @@ -137,7 +137,7 @@ routes.post(
routes.post(
'/user/multiple/restore',
Authorization,
asyncHandler(async function createData(req: Request, res: Response) {
asyncHandler(async function multipleRestore(req: Request, res: Response) {
const formData = req.getBody()
const arrayIds = arrayFormatter(formData.ids)

Expand All @@ -151,7 +151,7 @@ routes.post(
routes.post(
'/user/multiple/force-delete',
Authorization,
asyncHandler(async function createData(req: Request, res: Response) {
asyncHandler(async function multipleForceDelete(req: Request, res: Response) {
const formData = req.getBody()
const arrayIds = arrayFormatter(formData.ids)

Expand All @@ -165,7 +165,7 @@ routes.post(
routes.delete(
'/user/delete/:id',
Authorization,
asyncHandler(async function deleteData(req: Request, res: Response) {
asyncHandler(async function softDelete(req: Request, res: Response) {
const { id } = req.getParams()

await UserService.delete(id)
Expand All @@ -178,7 +178,7 @@ routes.delete(
routes.put(
'/user/restore/:id',
Authorization,
asyncHandler(async function deleteData(req: Request, res: Response) {
asyncHandler(async function restore(req: Request, res: Response) {
const { id } = req.getParams()

await UserService.restore(id)
Expand All @@ -191,7 +191,7 @@ routes.put(
routes.delete(
'/user/:id',
Authorization,
asyncHandler(async function deleteData(req: Request, res: Response) {
asyncHandler(async function softDelete(req: Request, res: Response) {
const { id } = req.getParams()

await UserService.delete(id, true)
Expand Down

0 comments on commit 1839fdb

Please sign in to comment.