Redirect to app page on Evotor market instead of generic market URL

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mguschin
2026-03-09 17:33:00 +03:00
parent 3f4bbcbb0d
commit 5acf597944

View File

@@ -18,7 +18,7 @@ logger = logging.getLogger(__name__)
router = APIRouter(prefix="/evotor")
templates = Jinja2Templates(directory="web/templates")
EVOTOR_LOGIN_URL = "https://market.evotor.ru/#/store/auth/login"
EVOTOR_APP_URL = "https://market.evotor.ru/store/apps/{app_id}"
EVOTOR_STORES_URL = "https://api.evotor.ru/stores"
# Pending connections older than this are ignored during linking
@@ -53,7 +53,8 @@ def evotor_connect(request: Request, user: User | None = Depends(get_current_use
request.session["evotor_connect_user_id"] = user.id
request.session["evotor_connect_at"] = datetime.utcnow().isoformat()
return RedirectResponse(EVOTOR_LOGIN_URL, 302)
url = EVOTOR_APP_URL.format(app_id=settings.EVOTOR_APP_ID)
return RedirectResponse(url, 302)
class EvotorTokenPayload(BaseModel):