proper query for invites::update hehexd

This commit is contained in:
shockrah 2020-09-17 20:06:34 -07:00
parent b673fc6ca1
commit e616a160fa

View File

@ -45,7 +45,8 @@ impl FromDB<Invite> for Invite {
async fn update(p: &Pool, row: Self) -> Response<Self> { async fn update(p: &Pool, row: Self) -> Response<Self> {
let q = r#"UPDATE invites let q = r#"UPDATE invites
SET id = :id, uses = :uses, expires: :exp SET uses = :uses, expires: :exp
WHERE id = :id
"#; "#;
// forcibly udpate even if theres nothing there // forcibly udpate even if theres nothing there
// this way we avoid doing an extra network hit // this way we avoid doing an extra network hit