Fix team member splits being set to 0 by default (#490)

This commit is contained in:
Geometrically 2022-12-02 09:32:17 -08:00 committed by GitHub
parent 820519b4f7
commit c34e2ab3e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 21 deletions

View File

@ -1287,23 +1287,6 @@
},
"query": "\n SELECT u.id, u.github_id, u.name, u.email,\n u.avatar_url, u.username, u.bio,\n u.created, u.role, u.badges,\n u.balance, u.payout_wallet, u.payout_wallet_type,\n u.payout_address, u.flame_anvil_key\n FROM users u\n WHERE u.id = ANY($1)\n "
},
"2d2e5b06be5125226ed9e4d7b7b5f99043db73537f2199f2146bdcd56091ae75": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Left": [
"Int8",
"Int8",
"Int8",
"Varchar",
"Int8",
"Bool"
]
}
},
"query": "\n INSERT INTO team_members (id, team_id, user_id, role, permissions, accepted)\n VALUES ($1, $2, $3, $4, $5, $6)\n "
},
"2f7c011654d15c85dbb614ac01ed5613a6872ea8c172ab38fdaa0eb38a7d6e4f": {
"describe": {
"columns": [],
@ -5476,6 +5459,24 @@
},
"query": "\n SELECT EXISTS(SELECT 1 FROM versions WHERE id = $1)\n "
},
"ca7c126749472d96fc1252c8a5391522426186339a71f830e382b435bb9e66c4": {
"describe": {
"columns": [],
"nullable": [],
"parameters": {
"Left": [
"Int8",
"Int8",
"Int8",
"Varchar",
"Int8",
"Bool",
"Numeric"
]
}
},
"query": "\n INSERT INTO team_members (id, team_id, user_id, role, permissions, accepted, payouts_split)\n VALUES ($1, $2, $3, $4, $5, $6, $7)\n "
},
"cb57ae673f1a7e50cc319efddb9bdc82e2251596bcf85aea52e8def343e423b8": {
"describe": {
"columns": [],

View File

@ -49,8 +49,8 @@ impl TeamBuilder {
sqlx::query!(
"
INSERT INTO team_members (id, team_id, user_id, role, permissions, accepted)
VALUES ($1, $2, $3, $4, $5, $6)
INSERT INTO team_members (id, team_id, user_id, role, permissions, accepted, payouts_split)
VALUES ($1, $2, $3, $4, $5, $6, $7)
",
team_member.id as TeamMemberId,
team_member.team_id as TeamId,
@ -58,6 +58,7 @@ impl TeamBuilder {
team_member.role,
team_member.permissions.bits() as i64,
team_member.accepted,
team_member.payouts_split,
)
.execute(&mut *transaction)
.await?;

View File

@ -8,9 +8,9 @@ use validator::Validate;
pub struct PackFormat {
pub game: String,
pub format_version: i32,
#[validate(length(min = 3, max = 512))]
#[validate(length(min = 1, max = 512))]
pub version_id: String,
#[validate(length(min = 3, max = 512))]
#[validate(length(min = 1, max = 512))]
pub name: String,
#[validate(length(max = 2048))]
pub summary: Option<String>,