add: circle stacks
This commit is contained in:
parent
50704d27a9
commit
56cea83933
27 changed files with 419 additions and 107 deletions
|
@ -259,7 +259,14 @@
|
|||
|
||||
self.define(
|
||||
"repost",
|
||||
(_, id, content, community, do_not_redirect = false) => {
|
||||
(
|
||||
_,
|
||||
id,
|
||||
content,
|
||||
community,
|
||||
do_not_redirect = false,
|
||||
is_stack = false,
|
||||
) => {
|
||||
return new Promise((resolve, _) => {
|
||||
fetch(`/api/v1/posts/${id}/repost`, {
|
||||
method: "POST",
|
||||
|
@ -268,7 +275,8 @@
|
|||
},
|
||||
body: JSON.stringify({
|
||||
content,
|
||||
community,
|
||||
community: !is_stack ? community : "0",
|
||||
stack: is_stack ? community : "0",
|
||||
}),
|
||||
})
|
||||
.then((res) => res.json())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue