[#34] added ky and condition to reconnect user on refresh
This commit is contained in:
@@ -1,12 +1,6 @@
|
||||
export default async function getOpenPaasUserId(opaque_token: string) {
|
||||
const response = await fetch(
|
||||
`${(window as any).CALENDAR_BASE_URL}/api/user`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${opaque_token}`,
|
||||
},
|
||||
}
|
||||
);
|
||||
const user = await response.json();
|
||||
import { api } from "../../utils/apiUtils";
|
||||
|
||||
export default async function getOpenPaasUserId() {
|
||||
const user = await api.get(`api/user`).json();
|
||||
return user;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user