diff --git a/ursh/indico_ursh/client/index.js b/ursh/indico_ursh/client/index.js index 9771580..4eceab1 100644 --- a/ursh/indico_ursh/client/index.js +++ b/ursh/indico_ursh/client/index.js @@ -32,24 +32,7 @@ async function _makeUrshRequest(originalURL, triggerElement) { } const data = response.data; - if (data.success) { - $(triggerElement).copyURLTooltip(data.msg).show(); - } else { - $(triggerElement).qtip({ - content: { - text: $T.gettext(`URL shortening service is unavailable: ${data.msg}`), - }, - hide: { - event: 'mouseleave', - fixed: true, - delay: 700, - }, - show: { - event: false, - ready: true, - } - }).show(); - } + $(triggerElement).copyURLTooltip(data.url).show(); } diff --git a/ursh/indico_ursh/controllers.py b/ursh/indico_ursh/controllers.py index 3998784..2bb50eb 100644 --- a/ursh/indico_ursh/controllers.py +++ b/ursh/indico_ursh/controllers.py @@ -48,4 +48,4 @@ class RHShortenURL(RH): full_url = self._resolve_full_url(original_url) self._check_host(full_url) short_url = request_short_url(full_url) - return jsonify(success=True, msg=short_url) + return jsonify(url=short_url)