From: Chocobozzz Date: Sun, 7 Feb 2016 09:42:55 +0000 (+0100) Subject: Add alert if the pod already made friends X-Git-Tag: v0.0.1-alpha~1040 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d7c01e7793d813d804a3b5716d8288f9dcf71a16;p=oweals%2Fpeertube.git Add alert if the pod already made friends --- diff --git a/public/javascripts/index.js b/public/javascripts/index.js index 5d42f02e0..3a02367c8 100644 --- a/public/javascripts/index.js +++ b/public/javascripts/index.js @@ -58,6 +58,11 @@ url: '/api/v1/pods/makefriends', type: 'GET', dataType: 'json', + statusCode: { + 409: function () { + alert('Already made friends.') + } + }, success: function () { alert('Made friends!') }