This commit is contained in:
Felix
2025-12-10 20:16:44 +08:00
parent 83d2a35553
commit f2d7c43b93
2 changed files with 5 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
# services/wx.py
from sqlalchemy.orm import Session
from typing import Optional
from datetime import datetime
from fastapi import Request, Response
from backend.app.admin.crud.wx_user_crud import wx_user_dao
from backend.app.admin.model.dict import DictCategory
@@ -48,7 +48,7 @@ class WxAuthService:
profile={
'dict_level': DictLevel.LEVEL1.value,
'dict_category': DictCategory.GENERAL.value,
'agree_terms': timezone.now().isoformat(),
'agree_terms': datetime.now().isoformat(),
},
)
await wx_user_dao.add(db, user)

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from pathlib import Path
from datetime import datetime
import uvicorn
from backend.middleware.cos_client import CosClient
@@ -17,8 +18,8 @@ app = register_app()
@app.get("/")
async def read_root():
await wx_user_index_history()
return {"Hello": f"World"}
# await wx_user_index_history()
return {"Hello": f"World, {datetime.now().isoformat()}"}
if __name__ == '__main__':