diff --git a/src/app/routes/api/v3/admin/forms/admin-forms.build.routes.ts b/src/app/routes/api/v3/admin/forms/admin-forms.form.routes.ts similarity index 95% rename from src/app/routes/api/v3/admin/forms/admin-forms.build.routes.ts rename to src/app/routes/api/v3/admin/forms/admin-forms.form.routes.ts index 2e15b5f77f..9bc846f117 100644 --- a/src/app/routes/api/v3/admin/forms/admin-forms.build.routes.ts +++ b/src/app/routes/api/v3/admin/forms/admin-forms.form.routes.ts @@ -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 @@ -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({ diff --git a/src/app/routes/api/v3/admin/forms/admin-forms.routes.ts b/src/app/routes/api/v3/admin/forms/admin-forms.routes.ts index 1bb06dbe33..ac5384d7bd 100644 --- a/src/app/routes/api/v3/admin/forms/admin-forms.routes.ts +++ b/src/app/routes/api/v3/admin/forms/admin-forms.routes.ts @@ -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' @@ -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)