From 601527d7953a83d6ad08dbb2ed8ac02851beaf1e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 1 Oct 2018 15:18:07 +0200 Subject: Check video channel name is unique on our instance --- .../my-account-video-channel-create.component.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts index 79ac07c93..81608d837 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts @@ -63,7 +63,14 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE this.router.navigate([ '/my-account', 'video-channels' ]) }, - err => this.error = err.message + err => { + if (err.status === 409) { + this.error = this.i18n('This name already exists on this instance.') + return + } + + this.error = err.message + } ) } -- cgit v1.2.3