diff --git a/cryptoai/routes/user.py b/cryptoai/routes/user.py index 37b1001..928f13d 100644 --- a/cryptoai/routes/user.py +++ b/cryptoai/routes/user.py @@ -232,7 +232,7 @@ async def register_user(user: UserRegister, session: Session = Depends(get_db)) nickname=user.nickname, password=hashed_password, level=0, # 默认为普通用户 - points=100 # 默认初始积分为100 + points=1 # 默认初始积分为100 ) if not success: diff --git a/cryptoai/tasks/user.py b/cryptoai/tasks/user.py index 3fc4672..7c24704 100644 --- a/cryptoai/tasks/user.py +++ b/cryptoai/tasks/user.py @@ -9,7 +9,7 @@ logger.setLevel(logging.DEBUG) def task_run(): try: session = SessionLocal() - users = session.query(User).filter(User.points < 1).all() + users = session.query(User).all() for user in users: user.points = 1 session.commit() diff --git a/docker-compose.yml b/docker-compose.yml index 2fa3267..986a512 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: cryptoai-task: build: . container_name: cryptoai-task - image: cryptoai:0.0.20 + image: cryptoai:0.0.21 restart: always volumes: - ./cryptoai/data:/app/cryptoai/data @@ -29,7 +29,7 @@ services: cryptoai-api: build: . container_name: cryptoai-api - image: cryptoai-api:0.2.7 + image: cryptoai-api:0.2.8 restart: always ports: - "8000:8000"