Merge pull request #18415 from overleaf/ii-delete-with-body

[web] Replace delete with post requests when having body

GitOrigin-RevId: b580cfa3bd53c21f46de72f3a36b647fda143b04
This commit is contained in:
ilkin-overleaf 2024-05-20 15:50:45 +03:00 committed by Copybot
parent f469d8e5e3
commit 7ca9a5b61b

View file

@ -952,6 +952,7 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
RateLimiterMiddleware.rateLimit(rateLimiters.removeProjectFromTag), RateLimiterMiddleware.rateLimit(rateLimiters.removeProjectFromTag),
TagsController.removeProjectFromTag TagsController.removeProjectFromTag
) )
// Deprecated
webRouter.delete( webRouter.delete(
'/tag/:tagId/projects', '/tag/:tagId/projects',
AuthenticationController.requireLogin(), AuthenticationController.requireLogin(),
@ -963,6 +964,17 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
}), }),
TagsController.removeProjectsFromTag TagsController.removeProjectsFromTag
) )
webRouter.post(
'/tag/:tagId/projects/remove',
AuthenticationController.requireLogin(),
RateLimiterMiddleware.rateLimit(rateLimiters.removeProjectsFromTag),
validate({
body: Joi.object({
projectIds: Joi.array().items(Joi.string()).required(),
}),
}),
TagsController.removeProjectsFromTag
)
webRouter.get( webRouter.get(
'/notifications', '/notifications',