Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly #289

Merged
merged 2 commits into from
Feb 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions backend/api/db/schemas/users.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pydantic import BaseModel
from uuid import UUID
from typing import Union
from typing import Union, Optional


class UserBase(BaseModel):
Expand All @@ -14,6 +14,7 @@ class UserCreate(UserBase):
class User(UserBase):
id: Union[int, str, UUID]
is_active: bool
authDisabled: Optional[bool]

class Config:
orm_mode = True
orm_mode = True
2 changes: 1 addition & 1 deletion backend/api/routers/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def get_user(db: Session = Depends(get_db), Authorize: AuthJWT = Depends()):
auth_check(Authorize)
auth_setting = str(settings.DISABLE_AUTH)
if auth_setting.lower() == "true":
current_user = models.User
current_user = schemas.User
current_user.authDisabled = True
current_user.id = 0
current_user.username = "user"
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/auth/LoginForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ export default {
mounted() {
this.authCheck();
},
created() {
this.authCheck();
}
// created() {
// this.authCheck();
// // }
};
</script>

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/store/modules/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const actions = {
resolve(resp);
})
.catch(error => {
console.error(error);
console.log(error);
commit(AUTH_CLEAR);
});
});
Expand All @@ -85,7 +85,7 @@ const actions = {
resolve(resp);
})
.catch(error => {
console.error(error);
console.log(error);
commit(AUTH_CLEAR);
});
});
Expand Down