[autofix.ci] apply automated fixes
This commit is contained in:
parent
6ec1c8f03a
commit
c03fda0d73
@ -16,18 +16,22 @@ class MobivateSMS extends NotificationProvider {
|
|||||||
let cleanMsg = msg.replace(/[^\x00-\x7F]/g, "").substring(0, 639);
|
let cleanMsg = msg.replace(/[^\x00-\x7F]/g, "").substring(0, 639);
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
"originator": notification.mobivateOriginator.substring(0, 15),
|
originator: notification.mobivateOriginator.substring(0, 15),
|
||||||
"recipients": notification.mobivateRecipients.split(",").map(n => n.replace(/[^0-9]/g, "")).filter(n => n.length >= 9).map(recipient => ({recipient})),
|
recipients: notification.mobivateRecipients
|
||||||
"text": cleanMsg
|
.split(",")
|
||||||
|
.map((n) => n.replace(/[^0-9]/g, ""))
|
||||||
|
.filter((n) => n.length >= 9)
|
||||||
|
.map((recipient) => ({ recipient })),
|
||||||
|
text: cleanMsg,
|
||||||
};
|
};
|
||||||
|
|
||||||
let config = {
|
let config = {
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"cache-control": "no-cache",
|
"cache-control": "no-cache",
|
||||||
"Accept": "application/json",
|
Accept: "application/json",
|
||||||
"Authorization": "Bearer " + notification.mobivateApikey
|
Authorization: "Bearer " + notification.mobivateApikey,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
config = this.getAxiosConfigWithProxy(config);
|
config = this.getAxiosConfigWithProxy(config);
|
||||||
|
|
||||||
|
|||||||
@ -1,18 +1,44 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="mobivate-key" class="form-label">{{ $t("API Key") }}<span style="color: red;"><sup>*</sup></span></label>
|
<label for="mobivate-key" class="form-label">
|
||||||
<HiddenInput id="mobivate-key" v-model="$parent.notification.mobivateApikey" :required="true" autocomplete="new-password"></HiddenInput>
|
{{ $t("API Key") }}
|
||||||
|
<span style="color: red"><sup>*</sup></span>
|
||||||
|
</label>
|
||||||
|
<HiddenInput
|
||||||
|
id="mobivate-key"
|
||||||
|
v-model="$parent.notification.mobivateApikey"
|
||||||
|
:required="true"
|
||||||
|
autocomplete="new-password"
|
||||||
|
></HiddenInput>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="mobivate-recipients" class="form-label">{{ $t("Recipients") }}</label>
|
<label for="mobivate-recipients" class="form-label">{{ $t("Recipients") }}</label>
|
||||||
<input id="mobivate-recipients" v-model="$parent.notification.mobivateRecipients" type="text" minlength="3" maxlength="20" pattern="^[\d+,]+$" class="form-control" required>
|
<input
|
||||||
|
id="mobivate-recipients"
|
||||||
|
v-model="$parent.notification.mobivateRecipients"
|
||||||
|
type="text"
|
||||||
|
minlength="3"
|
||||||
|
maxlength="20"
|
||||||
|
pattern="^[\d+,]+$"
|
||||||
|
class="form-control"
|
||||||
|
required
|
||||||
|
/>
|
||||||
<div class="form-text">
|
<div class="form-text">
|
||||||
<p>{{ $t("Comma separated list of numbers in international format. (eg. 447930000000,447930000001)") }}</p>
|
<p>{{ $t("Comma separated list of numbers in international format. (eg. 447930000000,447930000001)") }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="mobivate-originator" class="form-label">{{ $t("Originator") }}</label>
|
<label for="mobivate-originator" class="form-label">{{ $t("Originator") }}</label>
|
||||||
<input id="mobivate-originator" v-model="$parent.notification.mobivateOriginator" type="text" minlength="3" maxlength="15" pattern="^[a-zA-Z0-9]*$" class="form-control" required>
|
<input
|
||||||
|
id="mobivate-originator"
|
||||||
|
v-model="$parent.notification.mobivateOriginator"
|
||||||
|
type="text"
|
||||||
|
minlength="3"
|
||||||
|
maxlength="15"
|
||||||
|
pattern="^[a-zA-Z0-9]*$"
|
||||||
|
class="form-control"
|
||||||
|
required
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user