Commit a4516143 authored by crazywoola's avatar crazywoola

chore: remove unused deps

parent 25f28295
......@@ -8,7 +8,7 @@ from flask import current_app, request
from flask_restful import Resource, reqparse
from libs.helper import email
from libs.password import valid_password
from services.account_service import AccountService, TenantService
from services.account_service import AccountService
class LoginApi(Resource):
......@@ -30,11 +30,6 @@ class LoginApi(Resource):
except services.errors.account.AccountLoginError:
return {'code': 'unauthorized', 'message': 'Invalid email or password'}, 401
# try:
# TenantService.switch_tenant(account)
# except Exception:
# pass
AccountService.update_last_login(account, request)
# todo: return the user info
......
import enum
import json
from math import e
from typing import List
from extensions.ext_database import db
......
......@@ -11,7 +11,7 @@ from typing import Any, Dict, Optional
from constants.languages import languages, language_timezone_mapping
from events.tenant_event import tenant_was_created
from extensions.ext_redis import redis_client
from flask import current_app, session
from flask import current_app
from libs.helper import get_remote_ip
from libs.passport import PassportService
from libs.password import compare_password, hash_password
......@@ -23,7 +23,7 @@ from services.errors.account import (AccountAlreadyInTenantError, AccountLoginEr
NoPermissionError, RoleAlreadyAssignedError, TenantNotFound)
from sqlalchemy import func
from tasks.mail_invite_member_task import send_invite_member_mail_task
from werkzeug.exceptions import Forbidden, Unauthorized
from werkzeug.exceptions import Forbidden
def _create_tenant_for_account(account) -> Tenant:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment