develop #5

Merged
furu04 merged 9 commits from develop into main 2025-07-28 09:24:06 +00:00
4 changed files with 298 additions and 1 deletions
Showing only changes of commit 2acdef30a7 - Show all commits

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