Merge pull request #2074 from Infisical/feat/make-a-wish-feature

feat: make a wish feature
This commit is contained in:
Maidul Islam
2024-07-05 12:09:53 -04:00
committed by GitHub
15 changed files with 305 additions and 54 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;
};