fix: support replies on legacy databases
This commit is contained in:
1 parent
68b58851e8
commit
3840bb3c54
4 files changed
+145
-24
No files matched your search
+9
-2
@@ -77,10 +77,17 @@ export const API = {
|
||||
|
||||
// 回复
|
||||
getReplies(postId) { return apiFetch('/posts/' + postId + '/replies'); },
|
||||
createReply(postId, content, captcha, replyToId) {
|
||||
createReply(postId, content, captcha, replyToId, replyToUsername) {
|
||||
return apiFetch('/posts/' + postId + '/replies', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ content, captcha_id: captcha?.id, captcha_answer: captcha?.answer, captcha_sig: captcha?.sig, reply_to_id: replyToId || null }),
|
||||
body: JSON.stringify({
|
||||
content,
|
||||
captcha_id: captcha?.id,
|
||||
captcha_answer: captcha?.answer,
|
||||
captcha_sig: captcha?.sig,
|
||||
reply_to_id: replyToId || null,
|
||||
reply_to_username: replyToUsername || null,
|
||||
}),
|
||||
});
|
||||
},
|
||||
deleteReply(replyId) { return apiFetch('/replies/' + replyId, { method: 'DELETE' }); },
|
||||
|
||||
Reference in new issue
Block a user