fix: don't toggle follow when following back

This commit is contained in:
trisua 2025-07-15 15:59:05 -04:00
parent 70ecc6f96e
commit 0256f38e5d
7 changed files with 78 additions and 7 deletions

View file

@ -71,7 +71,6 @@
("name" "content")
("id" "content")
("placeholder" "content")
("required" "")
("minlength" "2")
("maxlength" "4096")))
(div

View file

@ -290,7 +290,7 @@
]);
fetch(
\"/api/v1/auth/user/{{ profile.id }}/follow\",
\"/api/v1/auth/user/{{ profile.id }}/follow/toggle\",
{
method: \"POST\",
},

View file

@ -81,7 +81,7 @@
(script
(text "globalThis.toggle_follow_user = async (e) => {
await trigger(\"atto::debounce\", [\"users::follow\"]);
fetch(\"/api/v1/auth/user/{{ profile.id }}/follow\", {
fetch(\"/api/v1/auth/user/{{ profile.id }}/follow/toggle\", {
method: \"POST\",
})
.then((res) => res.json())