fix: bind created timestamp
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kieran 2024-09-26 15:49:06 +01:00
parent 65a37c98b4
commit 3c3dee5cf8
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -89,7 +89,7 @@ impl Database {
pub async fn add_file(&self, file: &FileUpload, user_id: u64) -> Result<(), Error> {
let mut tx = self.pool.begin().await?;
let q = sqlx::query("insert ignore into \
uploads(id,name,size,mime_type,blur_hash,width,height,alt) values(?,?,?,?,?,?,?,?)")
uploads(id,name,size,mime_type,blur_hash,width,height,alt,created) values(?,?,?,?,?,?,?,?,?)")
.bind(&file.id)
.bind(&file.name)
.bind(file.size)
@ -97,7 +97,8 @@ impl Database {
.bind(&file.blur_hash)
.bind(file.width)
.bind(file.height)
.bind(&file.alt);
.bind(&file.alt)
.bind(&file.created);
tx.execute(q).await?;
let q2 = sqlx::query("insert ignore into user_uploads(file,user_id) values(?,?)")