diff options
author | Vitaly Takmazov | 2018-07-06 01:32:43 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:53 +0300 |
commit | 7f25b0f261b5a5fc2696054004fb24673375b91b (patch) | |
tree | 38ee591e176b4799e39eff7a16f1950e017e7bb4 /vnext/src/api/index.js | |
parent | 88732ba8c06c23a93f7248b6eabc182f38be3d33 (diff) |
Proptypes & eslint
Diffstat (limited to 'vnext/src/api/index.js')
-rw-r--r-- | vnext/src/api/index.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/vnext/src/api/index.js b/vnext/src/api/index.js index 653360f5..74280ed5 100644 --- a/vnext/src/api/index.js +++ b/vnext/src/api/index.js @@ -19,14 +19,14 @@ export function me(username = '', password = '') { client.get('/me', { headers: username ? { - 'Authorization': 'Basic ' + window.btoa(unescape(encodeURIComponent(username + ":" + password))) + 'Authorization': 'Basic ' + window.btoa(unescape(encodeURIComponent(username + ':' + password))) } : {} }).then(response => { localStorage.visitor = JSON.stringify(response.data); - resolve(response.data) + resolve(response.data); }).catch(reason => { - localStorage.clear() - reject(reason) + localStorage.clear(); + reject(reason); }) }); } @@ -57,9 +57,9 @@ export function getMessages(path, params) { } export function post(body, attach) { - let form = new FormData() - form.append('attach', attach) - form.append('body', body) + let form = new FormData(); + form.append('attach', attach); + form.append('body', body); return client.post('/post', form); } @@ -69,7 +69,7 @@ export function comment(mid, rid, body, attach) { form.append('rid', rid); form.append('body', body); form.append('attach', attach); - return client.post('/comment', form) + return client.post('/comment', form); } function socialLink(network) { @@ -86,4 +86,4 @@ export function vkLink() { export function markReadTracker(msg, visitor) { return `${apiBaseUrl}/thread/mark_read/${msg.mid}-${msg.rid || 0}.gif?hash=${visitor.hash}`; -}
\ No newline at end of file +} |