removing frivolous sql select(why was this even here tho)
This commit is contained in:
parent
f8ef9ef6eb
commit
b897e07273
@ -10,7 +10,6 @@ use mysql_async::prelude::Queryable;
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::perms::ADMIN_PERMS;
|
||||
use crate::db_types::UBigInt;
|
||||
|
||||
macro_rules! get_target_id {
|
||||
($obj:expr) => {
|
||||
@ -22,16 +21,8 @@ macro_rules! get_target_id {
|
||||
}
|
||||
|
||||
async fn modify_perms(p: &Pool, uid: u64, new_perms: u64) -> Result<(), SqlError>{
|
||||
/* NOTE: this whole func will return Ok(UpdateStatus)
|
||||
* */
|
||||
use mysql_async::{params, Conn};
|
||||
use mysql_async::params;
|
||||
let conn = p.get_conn().await?;
|
||||
let (conn, prow):(Conn, Option<(UBigInt, UBigInt)>) = conn.first_exec(
|
||||
"SELECT id, perms WHERE id = :id",
|
||||
params!{"id" => uid}
|
||||
).await?;
|
||||
|
||||
|
||||
conn.prep_exec(
|
||||
"UPDATE members SET permissions = :perms WHERE id = :id",
|
||||
params!{
|
||||
|
Loading…
Reference in New Issue
Block a user