Added placeholder and use default url if not specified

pull/4323/head
edo2313 10 months ago
parent 929f62cb68
commit e0743ce88b
No known key found for this signature in database

@ -27,7 +27,7 @@ class Whapi extends NotificationProvider {
"body": msg,
};
let url = notification.whapiApiUrl + "/messages/text";
let url = (notification.whapiApiUrl || "https://gate.whapi.cloud/").replace(/\/+$/, "") + "/messages/text";
await axios.post(url, data, config);

@ -1,7 +1,7 @@
<template>
<div class="mb-3">
<label for="whapi-api-url" class="form-label">{{ $t("API URL") }}</label>
<input id="whapi-api-url" v-model="$parent.notification.whapiApiUrl" type="text" class="form-control" required>
<input id="whapi-api-url" v-model="$parent.notification.whapiApiUrl" placeholder="https://gate.whapi.cloud/" type="text" class="form-control">
</div>
<div class="mb-3">

Loading…
Cancel
Save