mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-03-31 01:46:25 +00:00
* multi user wip * WIP MUM features * invitation mgmt * suspend or unsuspend users * workspace mangement * manage chats * manage chats * add Support for admin system settings for users to delete workspaces and limit chats per user * fix issue ith system var update app to lazy load invite page * cleanup and bug fixes * wrong method * update readme * update readme * update readme * bump version to 0.1.0
15 lines
455 B
JavaScript
15 lines
455 B
JavaScript
import { API_BASE } from "./constants";
|
|
import { baseHeaders } from "./request";
|
|
|
|
// Checks current localstorage and validates the session based on that.
|
|
export default async function validateSessionTokenForUser() {
|
|
const isValidSession = await fetch(`${API_BASE}/system/check-token`, {
|
|
method: "GET",
|
|
cache: "default",
|
|
headers: baseHeaders(),
|
|
})
|
|
.then((res) => res.status === 200)
|
|
.catch(() => false);
|
|
|
|
return isValidSession;
|
|
}
|