浏览代码

modified that frontend can see avairable time
and membership

tomoya 2 年之前
父节点
当前提交
59faa15155

+ 2 - 2
backend/app/app/schemas/user.py

@@ -10,7 +10,6 @@ class UserBase(BaseModel):
     is_superuser: bool = False
     full_name: Optional[str] = None
 
-
 # Properties to receive via API on creation
 class UserCreate(UserBase):
     email: EmailStr
@@ -24,7 +23,8 @@ class UserUpdate(UserBase):
 
 class UserInDBBase(UserBase):
     id: Optional[int] = None
-
+    available_time: Optional[int] = None
+    membership_status: Optional[str] = None
     class Config:
         orm_mode = True
 

+ 1 - 1
cloud-docker-compose.override.yml

@@ -3,7 +3,7 @@ services:
 
   proxy:
     ports:
-      - "8080:80"
+      - "80:80"
     command:
       # Enable Docker in Traefik, so that it reads labels from Docker services
       - --providers.docker

+ 2 - 0
frontend/src/interfaces/index.ts

@@ -4,6 +4,8 @@ export interface IUserProfile {
     is_superuser: boolean;
     full_name?: string;
     id: number;
+    available_time: number;
+    membership_status: string;
 }
 
 export interface IUserProfileUpdate {

+ 1 - 0
frontend/src/stores/main.ts

@@ -63,6 +63,7 @@ export const useMainStore = defineStore("MainStoreId", {
           this.setLoggedIn(true);
           this.setLogInError(false);
           await this.getUserProfile();
+          console.log(this.userProfile);
           await this.routeLoggedIn();
           this.addNotification({ content: i18n.global.t("loggedIn"), color: "success" });
         } else {