forked from groche97/mini_admin_bot
update dependencies and add rewrite urls
This commit is contained in:
@@ -36,10 +36,10 @@ impl<'a> Database {
|
||||
let mut statement = builder
|
||||
.prepare("SELECT id_stiker FROM bmedia WHERE id_stiker = ? and media_type=?")
|
||||
.unwrap();
|
||||
statement.bind(1, stiker_id).unwrap();
|
||||
statement.bind(2, media_type).unwrap();
|
||||
statement.bind((1, stiker_id)).unwrap();
|
||||
statement.bind((2, media_type)).unwrap();
|
||||
statement.next().unwrap();
|
||||
match statement.read::<String>(0) {
|
||||
match statement.read::<String, _>(0) {
|
||||
Ok(_s) => true,
|
||||
Err(_e) => false,
|
||||
}
|
||||
@@ -50,12 +50,12 @@ impl<'a> Database {
|
||||
let mut statement = builder
|
||||
.prepare("INSERT INTO bmedia (id_stiker, id_group, media_type) VALUES (?,?,?)")
|
||||
.unwrap();
|
||||
statement.bind(1, stiker_id).unwrap();
|
||||
statement.bind(2, group_id).unwrap();
|
||||
statement.bind(3, media_type).unwrap();
|
||||
statement.bind((1, stiker_id)).unwrap();
|
||||
statement.bind((2, group_id)).unwrap();
|
||||
statement.bind((3, media_type)).unwrap();
|
||||
match statement.next(){
|
||||
Ok(s)=>true,
|
||||
Err(e)=>false,
|
||||
Ok(_s)=>true,
|
||||
Err(_e)=>false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user