mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-08 16:32:38 +00:00
Merge pull request #6672 from overleaf/ta-router-apply-signature-fix
Use Correct Router Apply Function Signature GitOrigin-RevId: 567ff9a4c59834ae200bba860e265abe2e0173e5
This commit is contained in:
parent
c0fae79ad7
commit
21c92a045d
6 changed files with 8 additions and 8 deletions
services/web
app/src/Features
Collaborators
Editor
PasswordReset
StaticPages
Uploads
modules/launchpad/app/src
|
@ -9,7 +9,7 @@ const AnalyticsRegistrationSourceMiddleware = require('../Analytics/AnalyticsReg
|
|||
const { Joi, validate } = require('../../infrastructure/Validation')
|
||||
|
||||
module.exports = {
|
||||
apply(webRouter, apiRouter) {
|
||||
apply(webRouter) {
|
||||
webRouter.post(
|
||||
'/project/:Project_id/leave',
|
||||
AuthenticationController.requireLogin(),
|
||||
|
|
|
@ -5,7 +5,7 @@ const RateLimiterMiddleware = require('../Security/RateLimiterMiddleware')
|
|||
const { Joi, validate } = require('../../infrastructure/Validation')
|
||||
|
||||
module.exports = {
|
||||
apply(webRouter, apiRouter) {
|
||||
apply(webRouter, privateApiRouter) {
|
||||
webRouter.post(
|
||||
'/project/:Project_id/doc',
|
||||
AuthorizationMiddleware.ensureUserCanWriteProjectContent,
|
||||
|
@ -55,7 +55,7 @@ module.exports = {
|
|||
AuthorizationMiddleware.ensureUserCanWriteProjectContent,
|
||||
EditorHttpController.deleteFolder
|
||||
)
|
||||
apiRouter.post(
|
||||
privateApiRouter.post(
|
||||
'/project/:Project_id/doc/:entity_id/convert-to-file',
|
||||
AuthenticationController.requirePrivateApiAuth(),
|
||||
validate({
|
||||
|
@ -69,7 +69,7 @@ module.exports = {
|
|||
// Called by the real-time API to load up the current project state.
|
||||
// This is a post request because it's more than just a getting of data. We take actions
|
||||
// whenever a user joins a project, like updating the deleted status.
|
||||
apiRouter.post(
|
||||
privateApiRouter.post(
|
||||
'/project/:Project_id/join',
|
||||
AuthenticationController.requirePrivateApiAuth(),
|
||||
RateLimiterMiddleware.rateLimit({
|
||||
|
|
|
@ -5,7 +5,7 @@ const RateLimiterMiddleware = require('../Security/RateLimiterMiddleware')
|
|||
const { Joi, validate } = require('../../infrastructure/Validation')
|
||||
|
||||
module.exports = {
|
||||
apply(webRouter, apiRouter) {
|
||||
apply(webRouter) {
|
||||
const rateLimit = RateLimiterMiddleware.rateLimit({
|
||||
endpointName: 'password_reset_rate_limit',
|
||||
ipOnly: true,
|
||||
|
|
|
@ -12,7 +12,7 @@ const HomeController = require('./HomeController')
|
|||
const UniversityController = require('./UniversityController')
|
||||
|
||||
module.exports = {
|
||||
apply(webRouter, apiRouter) {
|
||||
apply(webRouter) {
|
||||
webRouter.get('/', HomeController.index)
|
||||
webRouter.get('/home', HomeController.home)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ const RateLimiterMiddleware = require('../Security/RateLimiterMiddleware')
|
|||
const Settings = require('@overleaf/settings')
|
||||
|
||||
module.exports = {
|
||||
apply(webRouter, apiRouter) {
|
||||
apply(webRouter) {
|
||||
webRouter.post(
|
||||
'/project/new/upload',
|
||||
AuthenticationController.requireLogin(),
|
||||
|
|
|
@ -15,7 +15,7 @@ const AuthenticationController = require('../../../../app/src/Features/Authentic
|
|||
const AuthorizationMiddleware = require('../../../../app/src/Features/Authorization/AuthorizationMiddleware')
|
||||
|
||||
module.exports = {
|
||||
apply(webRouter, apiRouter) {
|
||||
apply(webRouter) {
|
||||
logger.log({}, 'Init launchpad router')
|
||||
|
||||
webRouter.get('/launchpad', LaunchpadController.launchpadPage)
|
||||
|
|
Loading…
Add table
Reference in a new issue