Skip to content

Commit

Permalink
ref: rename admin-forms.build.routes to admin-forms.form.routes
Browse files Browse the repository at this point in the history
for consistency with #1635
  • Loading branch information
karrui committed Apr 15, 2021
1 parent 1ea1112 commit 43c5de8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Router } from 'express'
import { BasicField } from '../../../../../../types'
import * as AdminFormController from '../../../../../modules/form/admin-form/admin-form.controller'

export const AdminFormsBuildRouter = Router()
export const AdminFormsFormRouter = Router()
/**
* Update form field according to given new body.
* @route PUT /admin/forms/:formId/fields/:fieldId
Expand All @@ -21,7 +21,7 @@ export const AdminFormsBuildRouter = Router()
* @returns 422 when user in session cannot be retrieved from the database
* @returns 500 when database error occurs
*/
AdminFormsBuildRouter.put(
AdminFormsFormRouter.put(
'/:formId([a-fA-F0-9]{24})/fields/:fieldId([a-fA-F0-9]{24})',
celebrate({
[Segments.BODY]: Joi.object({
Expand Down
4 changes: 2 additions & 2 deletions src/app/routes/api/v3/admin/forms/admin-forms.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Router } from 'express'

import { withUserAuthentication } from '../../../../../modules/auth/auth.middlewares'

import { AdminFormsBuildRouter } from './admin-forms.build.routes'
import { AdminFormsFeedbackRouter } from './admin-forms.feedback.routes'
import { AdminFormsFormRouter } from './admin-forms.form.routes'
import { AdminFormsSettingsRouter } from './admin-forms.settings.routes'
import { AdminFormsSubmissionsRouter } from './admin-forms.submissions.routes'

Expand All @@ -12,7 +12,7 @@ export const AdminFormsRouter = Router()
// All routes in this handler should be protected by authentication.
AdminFormsRouter.use(withUserAuthentication)

AdminFormsRouter.use(AdminFormsBuildRouter)
AdminFormsRouter.use(AdminFormsSettingsRouter)
AdminFormsRouter.use(AdminFormsFeedbackRouter)
AdminFormsRouter.use(AdminFormsSubmissionsRouter)
AdminFormsRouter.use(AdminFormsFormRouter)

0 comments on commit 43c5de8

Please sign in to comment.