mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
3553fb2d9d
Fix spelling of "middleware" GitOrigin-RevId: d2b2b20ad8a6871cd6366303e75b340f0f2f2dda
15 lines
727 B
CoffeeScript
15 lines
727 B
CoffeeScript
AuthenticationController = require('../Authentication/AuthenticationController')
|
|
TemplatesController = require("./TemplatesController")
|
|
TemplatesMiddleware = require('./TemplatesMiddleware')
|
|
RateLimiterMiddleware = require('../Security/RateLimiterMiddleware')
|
|
|
|
module.exports =
|
|
apply: (app)->
|
|
|
|
app.get '/project/new/template/:Template_version_id', TemplatesMiddleware.saveTemplateDataInSession, AuthenticationController.requireLogin(), TemplatesController.getV1Template
|
|
|
|
app.post '/project/new/template', AuthenticationController.requireLogin(), RateLimiterMiddleware.rateLimit({
|
|
endpointName: "create-project-from-template"
|
|
maxRequests: 20
|
|
timeInterval: 60
|
|
}), TemplatesController.createProjectFromV1Template
|