ログイン処理部分を追加

This commit is contained in:
2025-07-27 22:48:30 +09:00
parent c53f850806
commit 2acdef30a7

View File

@@ -0,0 +1,15 @@
# ログイン処理書きかけ
from app.models.workout import User
from app.repositories.workout_repository import WorkoutRepository
class UserService:
def __init__(self):
# self.users = []
self.workout_repository = WorkoutRepository()
def login(self, username: str, password: str) -> User:
# TODO:入力されたパスワードをハッシュ化して比較する処理を追加する
for user in self.users:
if user.username == username and user.password == password:
return user
return None