admin firs step
This commit is contained in:
@@ -365,7 +365,7 @@ async def approve_staged_service(
|
||||
|
||||
from app.workers.service.validation_pipeline import ValidationPipeline
|
||||
from app.models.marketplace.service import ServiceProfile
|
||||
from app.models.gamification.gamification import GamificationProfile
|
||||
from app.models.gamification.gamification import UserStats
|
||||
|
||||
|
||||
class LocationUpdate(BaseModel):
|
||||
@@ -509,13 +509,13 @@ async def apply_gamification_penalty(
|
||||
)
|
||||
|
||||
# Megkeressük a felhasználó gamification profilját (vagy létrehozzuk)
|
||||
gamification_stmt = select(GamificationProfile).where(GamificationProfile.user_id == user_id)
|
||||
gamification_stmt = select(UserStats).where(UserStats.user_id == user_id)
|
||||
gamification_result = await db.execute(gamification_stmt)
|
||||
gamification = gamification_result.scalar_one_or_none()
|
||||
|
||||
if not gamification:
|
||||
# Ha nincs profil, létrehozzuk alapértelmezett értékekkel
|
||||
gamification = GamificationProfile(
|
||||
gamification = UserStats(
|
||||
user_id=user_id,
|
||||
level=0,
|
||||
xp=0,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# /opt/docker/dev/service_finder/backend/app/api/v1/endpoints/services.py
|
||||
from fastapi import APIRouter, Depends, Form, Query, HTTPException, status
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from sqlalchemy import select, and_, text
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#/opt/docker/dev/service_finder/backend/app/api/v1/endpoints/users.py
|
||||
from fastapi import APIRouter, Depends
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from typing import Dict, Any
|
||||
|
||||
Reference in New Issue
Block a user