mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-03 13:53:37 -05:00
Merge pull request #2196 from overleaf/jel-template-metrics
Set templateId for template graph requests GitOrigin-RevId: 65167a30ab427146582389ea44d3d1eb9ccecacf
This commit is contained in:
parent
c1f43ad60e
commit
398d355ffd
1 changed files with 3 additions and 0 deletions
|
@ -175,6 +175,9 @@ let UserMembershipMiddleware = {
|
|||
new HttpErrors.NotFoundError(`incorrect entity name: ${entityName}`)
|
||||
)
|
||||
}
|
||||
if (entityName === 'Template') {
|
||||
req.params.templateId = req.params.id
|
||||
}
|
||||
// run the list of middleware functions in series. This is essencially
|
||||
// a poor man's middleware runner
|
||||
async.eachSeries(middleware, (fn, callback) => fn(req, res, callback), next)
|
||||
|
|
Loading…
Reference in a new issue