Skip to content
Open
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
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

29 changes: 0 additions & 29 deletions .idea/03-commerce.iml

This file was deleted.

17 changes: 0 additions & 17 deletions .idea/dataSources.xml

This file was deleted.

456 changes: 0 additions & 456 deletions .idea/dbnavigator.xml

This file was deleted.

52 changes: 0 additions & 52 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

4 changes: 0 additions & 4 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
40 changes: 0 additions & 40 deletions .idea/sonarlint/issuestore/index.pb

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

1 change: 0 additions & 1 deletion account/admin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin

from account.forms import UserAdminChangeForm, UserAdminCreationForm
from account.models import User

Expand Down
3 changes: 1 addition & 2 deletions account/authorization.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from datetime import timedelta

from django.conf import settings
from django.contrib.auth import get_user_model
from jose import jwt, JWTError
Expand All @@ -9,6 +8,7 @@

TIME_DELTA = timedelta(days=120)


class GlobalAuth(HttpBearer):
def authenticate(self, request, token):
try:
Expand All @@ -24,4 +24,3 @@ def get_tokens_for_user(user):
return {
'access': str(token),
}

3 changes: 3 additions & 0 deletions account/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@ class AccountOut(Schema):
company_name: str = None
company_website: str = None


class TokenOut(Schema):
access: str


class AuthOut(Schema):
token: TokenOut
account: AccountOut


class SigninSchema(Schema):
email: EmailStr
password: str
Expand Down
Loading