This commit is contained in:
ari committed 2022-09-05 15:09:41 -04:00
1 parent a9b2bdb775
commit a4a607768a
53 files changed
+44 -44

No files matched your search

+22
View File
@@ -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>;