refactor(frontend): update API client to match cleaned REST routes

This commit is contained in:
2026-05-14 21:34:26 +02:00
parent e64404cf40
commit fc3b4146a5
2 changed files with 21 additions and 13 deletions

View File

@@ -2,7 +2,7 @@
import { useState } from "react";
import { useAuth } from "@/hooks/use-auth";
import { followRemoteUser, RemoteActor } from "@/lib/api";
import { followUser, RemoteActor } from "@/lib/api";
import { Button } from "@/components/ui/button";
import { UserAvatar } from "@/components/user-avatar";
import { toast } from "sonner";
@@ -24,7 +24,7 @@ export function RemoteUserCard({ actor }: RemoteUserCardProps) {
}
setLoading(true);
try {
await followRemoteUser(actor.handle, token);
await followUser(actor.handle, token);
setFollowed(true);
toast.success(`Follow request sent to ${actor.handle}`);
} catch {