aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/api/index.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-06-28 12:09:09 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:53 +0300
commit23d291df6146914683d5c414965a9f4396e464e2 (patch)
tree13e2a6993ac12a3a1ec984014633835ae3459ae7 /vnext/src/api/index.js
parent43ad3c12adc0372bebeef4cba26645811d1720af (diff)
working Post component
Diffstat (limited to 'vnext/src/api/index.js')
-rw-r--r--vnext/src/api/index.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/vnext/src/api/index.js b/vnext/src/api/index.js
index 00605d87..653360f5 100644
--- a/vnext/src/api/index.js
+++ b/vnext/src/api/index.js
@@ -56,6 +56,13 @@ export function getMessages(path, params) {
})
}
+export function post(body, attach) {
+ let form = new FormData()
+ form.append('attach', attach)
+ form.append('body', body)
+ return client.post('/post', form);
+}
+
export function comment(mid, rid, body, attach) {
let form = new FormData();
form.append('mid', mid);