add apispec swagger generation

This commit is contained in:
Gardient
2021-09-21 19:51:23 +03:00
parent d48f36df60
commit 2cab5310c9
3 changed files with 31 additions and 4 deletions

View File

@@ -16,7 +16,6 @@ blueprint = Blueprint('login', __name__)
@use_kwargs(login_schema)
@marshal_with(token_response_schema)
def login_user(username, password, **kwargs):
print(f'user: {username}; pass: {password}; expected:{current_app.config[constants.API_PASS]}')
if username == constants.API_USER and password == current_app.config[constants.API_PASS]:
return TokenResponse(create_access_token(identity=username, fresh=True))
else: