Add invite links
This commit is contained in:
@@ -12,6 +12,7 @@ from app.schemas.marathon import (
|
||||
MarathonUpdate,
|
||||
MarathonResponse,
|
||||
MarathonListItem,
|
||||
MarathonPublicInfo,
|
||||
ParticipantInfo,
|
||||
ParticipantWithUser,
|
||||
JoinMarathon,
|
||||
@@ -65,6 +66,7 @@ __all__ = [
|
||||
"MarathonUpdate",
|
||||
"MarathonResponse",
|
||||
"MarathonListItem",
|
||||
"MarathonPublicInfo",
|
||||
"ParticipantInfo",
|
||||
"ParticipantWithUser",
|
||||
"JoinMarathon",
|
||||
|
||||
@@ -79,6 +79,19 @@ class JoinMarathon(BaseModel):
|
||||
invite_code: str
|
||||
|
||||
|
||||
class MarathonPublicInfo(BaseModel):
|
||||
"""Public info about marathon for invite page (no auth required)"""
|
||||
id: int
|
||||
title: str
|
||||
description: str | None
|
||||
status: str
|
||||
participants_count: int
|
||||
creator_nickname: str
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class LeaderboardEntry(BaseModel):
|
||||
rank: int
|
||||
user: UserPublic
|
||||
|
||||
Reference in New Issue
Block a user