aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/api/index.js
diff options
context:
space:
mode:
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}`;
}