fix: incorrect votes
This commit is contained in:
1 parent
4e340f31e9
commit
e483d1ac54
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "photon-lemmy",
|
"name": "photon-lemmy",
|
||||||
"version": "1.4.6",
|
"version": "1.4.7",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
"dev": "vite dev",
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
if (!$profile?.jwt) return
|
if (!$profile?.jwt) return
|
||||||
vote = vote == 1 ? 0 : 1
|
vote = vote == 1 ? 0 : 1
|
||||||
score = await voteItem(post, vote == 1 ? 0 : 1, $profile.jwt)
|
score = await voteItem(post, vote, $profile.jwt)
|
||||||
}}
|
}}
|
||||||
size="square-sm"
|
size="square-sm"
|
||||||
color="tertiary"
|
color="tertiary"
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
if (!$profile?.jwt) return
|
if (!$profile?.jwt) return
|
||||||
vote = vote == -1 ? 0 : -1
|
vote = vote == -1 ? 0 : -1
|
||||||
score = await voteItem(post, vote == -1 ? 0 : -1, $profile.jwt)
|
score = await voteItem(post, vote, $profile.jwt)
|
||||||
}}
|
}}
|
||||||
size="square-sm"
|
size="square-sm"
|
||||||
color="tertiary"
|
color="tertiary"
|
||||||
|
|||||||
Reference in new issue
Block a user