aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/api/index.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-12-12 12:56:58 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:54 +0300
commit6e9a031a75d383b9d28fc7c391b8b892df19fd64 (patch)
treeec08c54eef3888e513726fddb93a3124cf7d02dc /vnext/src/api/index.js
parent24a4dcbd81e9f4defc8fee30fbeb0967a3db9b32 (diff)
Upload avatar
Diffstat (limited to 'vnext/src/api/index.js')
-rw-r--r--vnext/src/api/index.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/vnext/src/api/index.js b/vnext/src/api/index.js
index ab26a359..9bb9d5a3 100644
--- a/vnext/src/api/index.js
+++ b/vnext/src/api/index.js
@@ -76,6 +76,12 @@ export function comment(mid, rid, body, attach) {
return client.post('/comment', form);
}
+export function updateAvatar(newAvatar) {
+ let form = new FormData();
+ form.append('avatar', newAvatar);
+ return client.post('/me/upload', form);
+}
+
function socialLink(network) {
return `${apiBaseUrl}/_${network}login?state=${window.location.protocol}//${window.location.host}${window.location.pathname}`;
}