fix: include post url if it is not an image upload (#25)
Currently posts creation omits the URL if it is not an image upload.
This commit is contained in:
1 parent
03fa81bec8
commit
fb6b886c3b
1 file changed
+1
-1
@@ -109,7 +109,7 @@
|
|||||||
dispatcher('submit', post.post_view)
|
dispatcher('submit', post.post_view)
|
||||||
} else {
|
} else {
|
||||||
let image = data.image ? await uploadImage(data.image[0]) : undefined
|
let image = data.image ? await uploadImage(data.image[0]) : undefined
|
||||||
data.url = image
|
data.url = image || data.url
|
||||||
const post = await getClient().createPost({
|
const post = await getClient().createPost({
|
||||||
auth: $authData.token,
|
auth: $authData.token,
|
||||||
community_id: data.community!,
|
community_id: data.community!,
|
||||||
|
|||||||
Reference in new issue
Block a user