2023-06-11 10:18:37 +00:00
|
|
|
import { makeRequest } from "@frontend/kitui";
|
2023-05-30 18:34:41 +00:00
|
|
|
import { PatchUserRequest, User } from "@root/model/user";
|
|
|
|
|
|
|
|
|
|
|
|
const apiUrl = process.env.NODE_ENV === "production" ? "" : "https://hub.pena.digital";
|
|
|
|
|
|
|
|
export function patchUser(user: PatchUserRequest) {
|
|
|
|
return makeRequest<PatchUserRequest, User>({
|
|
|
|
url: apiUrl + "/user/",
|
|
|
|
contentType: true,
|
|
|
|
method: "PATCH",
|
|
|
|
useToken: true,
|
|
|
|
withCredentials: false,
|
|
|
|
body: user,
|
|
|
|
});
|
|
|
|
}
|