Store set IDs in database
This commit is contained in:
parent
73b5e4fc43
commit
79bf8e95e6
3 changed files with 22 additions and 14 deletions
|
|
@ -43,6 +43,7 @@ struct PageInfo {
|
|||
|
||||
#[derive(cynic::QueryFragment, Debug)]
|
||||
struct Set {
|
||||
id: Option<SetId>,
|
||||
start_at: Option<Timestamp>,
|
||||
started_at: Option<Timestamp>,
|
||||
#[arguments(includeByes: true)]
|
||||
|
|
@ -84,6 +85,7 @@ pub struct EventSetsResponse {
|
|||
|
||||
#[derive(Debug)]
|
||||
pub struct SetData {
|
||||
pub id: SetId,
|
||||
pub time: Timestamp,
|
||||
pub teams: Teams<PlayerData>,
|
||||
pub winner: usize,
|
||||
|
|
@ -127,6 +129,7 @@ impl QueryUnwrap<EventSetsVars> for EventSets {
|
|||
})
|
||||
.try_collect()?;
|
||||
Some(SetData {
|
||||
id: set.id?,
|
||||
time: set.start_at.or(set.started_at)?,
|
||||
teams,
|
||||
winner,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue