Przeglądaj źródła

add TCourseRole

visuddhinanda 2 lat temu
rodzic
commit
a20dddb3ff
1 zmienionych plików z 6 dodań i 4 usunięć
  1. 6 4
      dashboard/src/components/api/Course.ts

+ 6 - 4
dashboard/src/components/api/Course.ts

@@ -25,6 +25,7 @@ export interface ICourseDataRequest {
   join: string;
   join: string;
   request_exp: string;
   request_exp: string;
 }
 }
+export type TCourseRole = "teacher" | "assistant" | "student";
 export type TCourseJoinMode = "invite" | "manual" | "open";
 export type TCourseJoinMode = "invite" | "manual" | "open";
 export type TCourseExpRequest = "none" | "begin-end" | "daily";
 export type TCourseExpRequest = "none" | "begin-end" | "daily";
 export interface ICourseDataResponse {
 export interface ICourseDataResponse {
@@ -130,13 +131,14 @@ export interface ICourseMemberDeleteResponse {
   data: boolean;
   data: boolean;
 }
 }
 
 
+export interface ICourseUser {
+  role: TCourseRole;
+  channel_id?: string | null;
+}
 export interface ICourseCurrUserResponse {
 export interface ICourseCurrUserResponse {
   ok: boolean;
   ok: boolean;
   message: string;
   message: string;
-  data: {
-    role: string;
-    channel_id: string;
-  };
+  data: ICourseUser;
 }
 }
 
 
 export interface IExerciseListData {
 export interface IExerciseListData {