rename
This commit is contained in:
1 parent
a9b2bdb775
commit
a4a607768a
53 files changed
+44
-44
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { API } from "./base";
|
||||
import { UserProfile } from "./types";
|
||||
import { USER_PROFILE_ROOT } from "./paths";
|
||||
|
||||
export const makeProfileAPI = (api: API) => ({
|
||||
async get() {
|
||||
const data = await api.makeCall<UserProfile>({
|
||||
method: "GET",
|
||||
path: USER_PROFILE_ROOT,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
async update(data: UserProfile) {
|
||||
return await api.makeCall({
|
||||
method: "PUT",
|
||||
path: USER_PROFILE_ROOT,
|
||||
data,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
export type UserProfileAPI = ReturnType<typeof makeProfileAPI>;
|
||||
Reference in new issue
Block a user