Merge pull request #5155 from overleaf/ta-registration-properties-tests

Test Registration Sources User Properties

GitOrigin-RevId: c0cf033334161df219c71525c0054b22a97043a7
This commit is contained in:
Timothée Alby 2021-09-23 11:02:24 +02:00 committed by Copybot
parent f5fce04e34
commit 1e9f37652a

View file

@ -8,22 +8,22 @@ module.exports = {
apply(app) {
app.get(
'/project/new/template/:Template_version_id',
AnalyticsRegistrationSourceMiddleware.setSource('template'),
TemplatesMiddleware.saveTemplateDataInSession,
AuthenticationController.requireLogin(),
TemplatesController.getV1Template
TemplatesController.getV1Template,
AnalyticsRegistrationSourceMiddleware.clearSource()
)
app.post(
'/project/new/template',
AnalyticsRegistrationSourceMiddleware.setSource('template'),
AuthenticationController.requireLogin(),
RateLimiterMiddleware.rateLimit({
endpointName: 'create-project-from-template',
maxRequests: 20,
timeInterval: 60,
}),
TemplatesController.createProjectFromV1Template,
AnalyticsRegistrationSourceMiddleware.clearSource()
TemplatesController.createProjectFromV1Template
)
},
}