refactor: move like api route into mii folder

This commit is contained in:
trafficlunar 2025-04-13 17:50:38 +01:00
parent 49d3cf7e8a
commit 3f4a757bb1
2 changed files with 1 additions and 1 deletions

View file

@ -22,7 +22,7 @@ export default function LikeButton({ likes, isLiked, miiId, isLoggedIn, big }: P
setIsLikedState((prev) => !prev);
setLikesState((prev) => (isLiked ? prev - 1 : prev + 1));
const response = await fetch("/api/like", { method: "PATCH", body: JSON.stringify({ miiId }) });
const response = await fetch("/api/mii/like", { method: "PATCH", body: JSON.stringify({ miiId }) });
const { liked, count } = await response.json();
setIsLikedState(liked);