Skip to content

Commit

Permalink
fix(rollback): add in rollback handler
Browse files Browse the repository at this point in the history
  • Loading branch information
kishore03109 committed Nov 14, 2023
1 parent c907f83 commit afabc18
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/routes/v2/authenticatedSites/contactUs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { BadRequestError } = require("@errors/BadRequestError")

const {
attachReadRouteHandlerWrapper,
attachWriteRouteHandlerWrapper,
attachRollbackRouteHandlerWrapper,
} = require("@middleware/routeHandler")

const { UpdateContactUsSchema } = require("@validators/RequestSchema")
Expand Down Expand Up @@ -53,7 +53,7 @@ class ContactUsRouter {
const router = express.Router({ mergeParams: true })

router.get("/", attachReadRouteHandlerWrapper(this.readContactUs))
router.post("/", attachWriteRouteHandlerWrapper(this.updateContactUs))
router.post("/", attachRollbackRouteHandlerWrapper(this.updateContactUs))

return router
}
Expand Down
4 changes: 2 additions & 2 deletions src/routes/v2/authenticatedSites/homepage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { BadRequestError } = require("@errors/BadRequestError")

const {
attachReadRouteHandlerWrapper,
attachWriteRouteHandlerWrapper,
attachRollbackRouteHandlerWrapper,
} = require("@middleware/routeHandler")

const { UpdateHomepageSchema } = require("@validators/RequestSchema")
Expand Down Expand Up @@ -59,7 +59,7 @@ class HomepageRouter {
const router = express.Router({ mergeParams: true })

router.get("/", attachReadRouteHandlerWrapper(this.readHomepage))
router.post("/", attachWriteRouteHandlerWrapper(this.updateHomepage))
router.post("/", attachRollbackRouteHandlerWrapper(this.updateHomepage))

return router
}
Expand Down
4 changes: 2 additions & 2 deletions src/routes/v2/authenticatedSites/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { BadRequestError } = require("@errors/BadRequestError")

const {
attachReadRouteHandlerWrapper,
attachWriteRouteHandlerWrapper,
attachRollbackRouteHandlerWrapper,
} = require("@middleware/routeHandler")

const { UpdateNavigationRequestSchema } = require("@validators/RequestSchema")
Expand Down Expand Up @@ -52,7 +52,7 @@ class NavigationRouter {
const router = express.Router({ mergeParams: true })

router.get("/", attachReadRouteHandlerWrapper(this.readNavigation))
router.post("/", attachWriteRouteHandlerWrapper(this.updateNavigation))
router.post("/", attachRollbackRouteHandlerWrapper(this.updateNavigation))

return router
}
Expand Down
3 changes: 1 addition & 2 deletions src/routes/v2/authenticatedSites/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const { BadRequestError } = require("@errors/BadRequestError")
// Import middleware
const {
attachReadRouteHandlerWrapper,
attachWriteRouteHandlerWrapper,
attachRollbackRouteHandlerWrapper,
} = require("@middleware/routeHandler")

Expand Down Expand Up @@ -136,7 +135,7 @@ class SettingsRouter {
router.post(
"/repo-password",
this.authorizationMiddleware.verifyIsEmailUser,
attachWriteRouteHandlerWrapper(this.updateRepoPassword)
attachRollbackRouteHandlerWrapper(this.updateRepoPassword)
)

return router
Expand Down

0 comments on commit afabc18

Please sign in to comment.