update
This commit is contained in:
parent
dd66f9c471
commit
347e171849
@ -232,7 +232,7 @@ async def register_user(user: UserRegister, session: Session = Depends(get_db))
|
|||||||
nickname=user.nickname,
|
nickname=user.nickname,
|
||||||
password=hashed_password,
|
password=hashed_password,
|
||||||
level=0, # 默认为普通用户
|
level=0, # 默认为普通用户
|
||||||
points=100 # 默认初始积分为100
|
points=1 # 默认初始积分为100
|
||||||
)
|
)
|
||||||
|
|
||||||
if not success:
|
if not success:
|
||||||
|
|||||||
@ -9,7 +9,7 @@ logger.setLevel(logging.DEBUG)
|
|||||||
def task_run():
|
def task_run():
|
||||||
try:
|
try:
|
||||||
session = SessionLocal()
|
session = SessionLocal()
|
||||||
users = session.query(User).filter(User.points < 1).all()
|
users = session.query(User).all()
|
||||||
for user in users:
|
for user in users:
|
||||||
user.points = 1
|
user.points = 1
|
||||||
session.commit()
|
session.commit()
|
||||||
|
|||||||
@ -4,7 +4,7 @@ services:
|
|||||||
cryptoai-task:
|
cryptoai-task:
|
||||||
build: .
|
build: .
|
||||||
container_name: cryptoai-task
|
container_name: cryptoai-task
|
||||||
image: cryptoai:0.0.20
|
image: cryptoai:0.0.21
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./cryptoai/data:/app/cryptoai/data
|
- ./cryptoai/data:/app/cryptoai/data
|
||||||
@ -29,7 +29,7 @@ services:
|
|||||||
cryptoai-api:
|
cryptoai-api:
|
||||||
build: .
|
build: .
|
||||||
container_name: cryptoai-api
|
container_name: cryptoai-api
|
||||||
image: cryptoai-api:0.2.7
|
image: cryptoai-api:0.2.8
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user