update profile
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
import { api } from "@/config/axios";
|
||||
import { GetProfileResponse } from "../types/Types";
|
||||
import { GetProfileResponse, UpdateProfileType } from "../types/Types";
|
||||
|
||||
export const getProfile = async (): Promise<GetProfileResponse> => {
|
||||
const { data } = await api.get<GetProfileResponse>("/public/user/me");
|
||||
return data;
|
||||
};
|
||||
|
||||
export const updateProfile = async (params: UpdateProfileType) => {
|
||||
const { data } = await api.patch("/public/user/update", params);
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user