refactor: move like api route into mii folder
This commit is contained in:
parent
49d3cf7e8a
commit
3f4a757bb1
2 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue