update dependencies and add rewrite urls

This commit is contained in:
2024-09-24 21:09:06 +02:00
parent c94df04eed
commit deec5840fc
8 changed files with 1468 additions and 540 deletions

View File

@@ -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,
}
}
}