mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #1375 from sharelatex/spd-open-in-overleaf-brand-variation-ids
open-in-overleaf: Add support for 'brand_variation_id' parameter GitOrigin-RevId: 65c7732c3a3b85e524e9ac1ae6f13cd322ef8ccb
This commit is contained in:
parent
b7daca4f3f
commit
f49523f6bc
1 changed files with 9 additions and 0 deletions
|
@ -38,6 +38,8 @@ module.exports = MockV1Api =
|
|||
|
||||
brands: {}
|
||||
|
||||
brand_variations: {}
|
||||
|
||||
validation_clients: {}
|
||||
|
||||
setAffiliations: (affiliations) -> @affiliations = affiliations
|
||||
|
@ -140,6 +142,13 @@ module.exports = MockV1Api =
|
|||
else
|
||||
res.status(404).json {}
|
||||
|
||||
app.get "/api/v2/brand_variations/:id", (req, res, next) =>
|
||||
variation = @brand_variations[req.params.id]
|
||||
if variation?
|
||||
res.status(200).json variation
|
||||
else
|
||||
res.status(404).json {}
|
||||
|
||||
app.get '/api/v1/sharelatex/docs/:token/is_published', (req, res, next) =>
|
||||
res.json { allow: true }
|
||||
|
||||
|
|
Loading…
Reference in a new issue