mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-24 20:14:19 +00:00
Sort replies to matchmaking based on their choice
This commit is contained in:
parent
0c6907a9da
commit
c855a156f8
2 changed files with 2 additions and 1 deletions
|
@ -7,7 +7,7 @@ use diesel::serialize::{IsNull, ToSql};
|
|||
|
||||
use super::super::schema::sql_types;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, FromSqlRow, AsExpression)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, FromSqlRow, AsExpression)]
|
||||
#[diesel(sql_type = sql_types::MatchmakingChoice)]
|
||||
pub enum MatchmakingChoice {
|
||||
Yes,
|
||||
|
|
|
@ -33,6 +33,7 @@ impl MatchmakingReply {
|
|||
.filter(matchmaking_replies::matchmaking_id.eq(matchmaking_id))
|
||||
.inner_join(users::table.on(matchmaking_replies::user_id.eq(users::id)))
|
||||
.inner_join(telegram::table.on(users::id.eq(telegram::user_id)))
|
||||
.order_by(matchmaking_replies::choice)
|
||||
.get_results::<(Self, RoyalnetUser, TelegramUser)>(database)
|
||||
.context("Non è stato possibile recuperare le risposte al matchmaking dal database RYG.")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue