feat: Remove restrictions on API channel webhook_url (#2261)

This commit is contained in:
Pranav Raj S
2021-05-13 15:03:25 +05:30
committed by GitHub
parent 35f8d01a0c
commit 836b317b8a
6 changed files with 50 additions and 8 deletions

View File

@@ -56,7 +56,8 @@ import { required } from 'vuelidate/lib/validators';
import router from '../../../../index';
import PageHeader from '../../SettingsSubPageHeader';
const shouldBeWebhookUrl = (value = '') => value.startsWith('http');
const shouldBeWebhookUrl = (value = '') =>
value ? value.startsWith('http') : true;
export default {
components: {
@@ -76,7 +77,7 @@ export default {
},
validations: {
channelName: { required },
webhookUrl: { required, shouldBeWebhookUrl },
webhookUrl: { shouldBeWebhookUrl },
},
methods: {
async createChannel() {