Skip to content

Commit 0586a48

Browse files
committed
fix: eslint
1 parent 68b998f commit 0586a48

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/services/unifonic.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
const UNIFONIC_URL = 'http://api.unifonic.com/rest/Messages/Send';
1+
const UNIFONIC_URL = "http://api.unifonic.com/rest/Messages/Send";
22

33
exports.sendText = async function(appsid, recipient, body) {
4-
if (body.length > 160) {
5-
throw new Error('Message should be 160 characters or less')
6-
}
7-
8-
const fetchData = {
9-
method: "POST",
10-
headers: {
11-
'Content-Type': 'application/x-www-form-urlencoded',
12-
},
13-
body: `AppSid=${appsid}&Recipient=${recipient}&Body=${body}`
14-
}
4+
if (body.length > 160) {
5+
throw new Error("Message should be 160 characters or less");
6+
}
157

16-
const response = await fetch(UNIFONIC_URL, fetchData);
17-
return response.json();
8+
const fetchData = {
9+
method: "POST",
10+
headers: {
11+
"Content-Type": "application/x-www-form-urlencoded",
12+
},
13+
body: `AppSid=${appsid}&Recipient=${recipient}&Body=${body}`,
14+
};
15+
16+
const response = await fetch(UNIFONIC_URL, fetchData);
17+
return response.json();
1818
};

0 commit comments

Comments
 (0)