mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-11 17:56:55 -05:00
make loading of module routes more robust
This commit is contained in:
parent
5ad3fd769d
commit
3e8ad69f3c
1 changed files with 2 additions and 1 deletions
|
@ -17,11 +17,12 @@ module.exports = Modules =
|
||||||
|
|
||||||
applyRouter: (webRouter, apiRouter) ->
|
applyRouter: (webRouter, apiRouter) ->
|
||||||
for module in @modules
|
for module in @modules
|
||||||
module.router?.apply(webRouter, apiRouter)
|
module.router?.apply?(webRouter, apiRouter)
|
||||||
|
|
||||||
applyNonCsrfRouter: (webRouter, apiRouter) ->
|
applyNonCsrfRouter: (webRouter, apiRouter) ->
|
||||||
for module in @modules
|
for module in @modules
|
||||||
module.nonCsrfRouter?.apply(webRouter, apiRouter)
|
module.nonCsrfRouter?.apply(webRouter, apiRouter)
|
||||||
|
module.router?.applyNonCsrfRouter?(webRouter, apiRouter)
|
||||||
|
|
||||||
viewIncludes: {}
|
viewIncludes: {}
|
||||||
loadViewIncludes: (app) ->
|
loadViewIncludes: (app) ->
|
||||||
|
|
Loading…
Reference in a new issue