Esempio n. 1
0
    def find_all_users() -> list:
        users = UserModel.get_all_users()

        for user in users:
            user.pop("password")

        return users
Esempio n. 2
0
    def login_user(email: str, password: str) -> dict:
        users = UserModel.get_all_users()

        for user in users:
            print(user)
            print(email, user["email"], email == user["email"])
            print(password, user["password"], password == user["password"])
            if user["email"] == email and user["password"] == password:
                user.pop("password")
                return user

        return None