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:
Simon Detheridge 2019-01-11 14:15:08 +00:00 committed by sharelatex
parent b7daca4f3f
commit f49523f6bc

View file

@ -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 }