get lessons list

This commit is contained in:
2024-02-29 09:18:13 +03:00
parent 5134d44e39
commit 80713f7e0f
7 changed files with 72 additions and 54 deletions

View File

@@ -11,7 +11,7 @@ interface TokenData {
nonce: string;
session_state: string;
acr: string;
'allowed-origins': string[];
"allowed-origins": string[];
realm_access: Realmaccess;
resource_access: Resourceaccess;
scope: string;
@@ -25,25 +25,34 @@ interface TokenData {
}
interface Resourceaccess {
'realm-management': Realmaccess;
jurnal: Realmaccess;
broker: Realmaccess;
account: Realmaccess;
'microfrontend-admin': Realmaccess
journal: Realmaccess;
}
interface Realmaccess {
roles: string[];
roles: (string | "teacher")[];
}
export interface UserData extends TokenData {
sub: string;
gravatar: string;
email_verified: boolean;
attributes: Record<string, string[]>
attributes: Record<string, string[]>;
name: string;
preferred_username: string;
given_name: string;
family_name: string;
email: string;
}
export type BaseResponse<Data> = {
success: boolean;
body: Data;
};
export interface Lesson {
_id: string;
name: string;
students: any[];
date: string;
created: string;
}