forked from cadence/out-of-your-element
Add new WHERE feature to my funny orm
This commit is contained in:
parent
28abdac5b6
commit
475cd5b724
30 changed files with 149 additions and 105 deletions
|
@ -43,7 +43,7 @@ async function uploadDiscordFileToMxc(path) {
|
|||
}
|
||||
|
||||
// Has this file already been uploaded in the past? Grab the existing copy from the database.
|
||||
const existingFromDb = select("file", "mxc_url", "WHERE discord_url = ?").pluck().get(urlNoExpiry)
|
||||
const existingFromDb = select("file", "mxc_url", {discord_url: urlNoExpiry}).pluck().get()
|
||||
if (typeof existingFromDb === "string") {
|
||||
return existingFromDb
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue