Fixed react refresh bug and fixed white background when clicking on task which was a TASK_AUDIT hangover from react local storagedb now pointing too python fastapi

This commit is contained in:
NPS Agent
2026-05-11 14:04:13 +09:30
parent 3825c7556b
commit 49dc767922
10 changed files with 156 additions and 656 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ app.add_middleware(
)
@app.post("/token", response_model=schemas.Token)
async def login_for_access_token(form_data: schemas.UserCreate, db: Session = Depends(get_db)):
async def login_for_access_token(form_data: schemas.UserLogin, db: Session = Depends(get_db)):
user = db.query(models.User).filter(models.User.id == form_data.id).first()
if not user or not auth.verify_password(form_data.password, user.password_hash):
raise HTTPException(
+4
View File
@@ -16,6 +16,10 @@ class UserBase(BaseModel):
class UserCreate(UserBase):
password: str
class UserLogin(BaseModel):
id: str
password: str
class User(UserBase):
created_at: datetime
class Config:
+2 -1
View File
@@ -119,7 +119,7 @@ def seed_db():
status=t['status'],
added_at=datetime.fromisoformat(t['addedAt'])
)
db.merge(db_task)
db_task = db.merge(db_task)
# Add tags
for tag_name in t.get('tags', []):
@@ -127,6 +127,7 @@ def seed_db():
if not tag:
tag = models.Tag(tag=tag_name)
db.add(tag)
db.flush()
if tag not in db_task.tags:
db_task.tags.append(tag)