Fix encryption not working after restarting
This commit is contained in:
@@ -70,6 +70,7 @@ interface UserInfo {
|
||||
username: string;
|
||||
is_admin: boolean;
|
||||
is_oidc: boolean;
|
||||
data_unlocked: boolean;
|
||||
}
|
||||
|
||||
interface UserCount {
|
||||
@@ -1512,6 +1513,15 @@ export async function getUserInfo(): Promise<UserInfo> {
|
||||
}
|
||||
}
|
||||
|
||||
export async function unlockUserData(password: string): Promise<{ success: boolean; message: string }> {
|
||||
try {
|
||||
const response = await authApi.post("/users/unlock-data", { password });
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
handleApiError(error, "unlock user data");
|
||||
}
|
||||
}
|
||||
|
||||
export async function getRegistrationAllowed(): Promise<{ allowed: boolean }> {
|
||||
try {
|
||||
const response = await authApi.get("/users/registration-allowed");
|
||||
|
||||
Reference in New Issue
Block a user