From 531f5fb6ee010becf76c6a319cc87fd1c9ce1784 Mon Sep 17 00:00:00 2001 From: Simon Detheridge Date: Wed, 19 Dec 2018 15:52:44 +0000 Subject: [PATCH] Merge pull request #1280 from sharelatex/spd-open-in-overleaf-conversions open-in-overleaf: Add support for partner and client_media_id parameters GitOrigin-RevId: a4c18a03affa62a1ef2cfb0c595766724ba8969b --- .../test/acceptance/coffee/helpers/MockV1Api.coffee | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/services/web/test/acceptance/coffee/helpers/MockV1Api.coffee b/services/web/test/acceptance/coffee/helpers/MockV1Api.coffee index 94004cee22..1f22a0caa5 100644 --- a/services/web/test/acceptance/coffee/helpers/MockV1Api.coffee +++ b/services/web/test/acceptance/coffee/helpers/MockV1Api.coffee @@ -38,6 +38,8 @@ module.exports = MockV1Api = brands: {} + validation_clients: {} + setAffiliations: (affiliations) -> @affiliations = affiliations run: () -> @@ -126,6 +128,14 @@ module.exports = MockV1Api = valid: false } + app.get "/api/v2/partners/:partner/conversions/:id", (req, res, next) => + partner = @validation_clients[req.params.partner] + conversion = partner?.conversions?[req.params.id] + if conversion? + res.status(200).json {input_file_uri: conversion, brand_variation_id: partner.brand_variation_id} + else + res.status(404).json {} + app.listen 5000, (error) -> throw error if error? .on "error", (error) ->