fix code
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# services/wx.py
|
# services/wx.py
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
from datetime import datetime
|
||||||
from fastapi import Request, Response
|
from fastapi import Request, Response
|
||||||
from backend.app.admin.crud.wx_user_crud import wx_user_dao
|
from backend.app.admin.crud.wx_user_crud import wx_user_dao
|
||||||
from backend.app.admin.model.dict import DictCategory
|
from backend.app.admin.model.dict import DictCategory
|
||||||
@@ -48,7 +48,7 @@ class WxAuthService:
|
|||||||
profile={
|
profile={
|
||||||
'dict_level': DictLevel.LEVEL1.value,
|
'dict_level': DictLevel.LEVEL1.value,
|
||||||
'dict_category': DictCategory.GENERAL.value,
|
'dict_category': DictCategory.GENERAL.value,
|
||||||
'agree_terms': timezone.now().isoformat(),
|
'agree_terms': datetime.now().isoformat(),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
await wx_user_dao.add(db, user)
|
await wx_user_dao.add(db, user)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
import uvicorn
|
import uvicorn
|
||||||
from backend.middleware.cos_client import CosClient
|
from backend.middleware.cos_client import CosClient
|
||||||
@@ -17,8 +18,8 @@ app = register_app()
|
|||||||
|
|
||||||
@app.get("/")
|
@app.get("/")
|
||||||
async def read_root():
|
async def read_root():
|
||||||
await wx_user_index_history()
|
# await wx_user_index_history()
|
||||||
return {"Hello": f"World"}
|
return {"Hello": f"World, {datetime.now().isoformat()}"}
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Reference in New Issue
Block a user