feat: finished up wish integration

This commit is contained in:
Sheen Capadngan
2024-07-05 15:19:43 +08:00
parent 2c9fdb7fad
commit da0d8fdbfc
15 changed files with 303 additions and 36 deletions
@@ -0,0 +1 @@
export { useCreateUserWish } from "./mutations";
@@ -0,0 +1,14 @@
import { useMutation } from "@tanstack/react-query";
import { apiRequest } from "@app/config/request";
import { TCreateUserWishDto } from "./types";
export const useCreateUserWish = () => {
return useMutation<{}, {}, TCreateUserWishDto>({
mutationFn: async (dto) => {
const { data } = await apiRequest.post("/api/v1/user-engagement/me/wish", dto);
return data;
}
});
};
@@ -0,0 +1,3 @@
export type TCreateUserWishDto = {
text: string;
};