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
2 changes: 1 addition & 1 deletion .idea/03-commerce.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion account/authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

TIME_DELTA = timedelta(days=120)


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

17 changes: 17 additions & 0 deletions account/migrations/0002_alter_user_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.2.8 on 2021-11-06 20:02

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('account', '0001_initial'),
]

operations = [
migrations.AlterModelOptions(
name='user',
options={'verbose_name': 'user', 'verbose_name_plural': 'users'},
),
]
5 changes: 5 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 All @@ -48,3 +51,5 @@ class ChangePasswordSchema(Schema):
old_password: str
new_password1: str
new_password2: str


Loading