mirror of
https://github.com/v0l/route96.git
synced 2025-06-19 15:06:45 +00:00
fix: mime match starts with
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -234,8 +234,9 @@ impl Database {
|
|||||||
) -> Result<(Vec<(FileUpload, Vec<User>)>, i64), Error> {
|
) -> Result<(Vec<(FileUpload, Vec<User>)>, i64), Error> {
|
||||||
let mut q = QueryBuilder::new("select u.* from uploads u ");
|
let mut q = QueryBuilder::new("select u.* from uploads u ");
|
||||||
if let Some(m) = mime_type {
|
if let Some(m) = mime_type {
|
||||||
q.push("where u.mime_type like ");
|
q.push("where INSTR(");
|
||||||
q.push_bind(m);
|
q.push_bind(m);
|
||||||
|
q.push(",u.mime_type) = 0");
|
||||||
}
|
}
|
||||||
q.push(" order by u.created desc limit ");
|
q.push(" order by u.created desc limit ");
|
||||||
q.push_bind(limit);
|
q.push_bind(limit);
|
||||||
|
Reference in New Issue
Block a user