TIL MySQL is not case-sensitive by default in queries! https://stackoverflow.com/a/7857705
This commit is contained in:
@@ -21,14 +21,18 @@ export default async (userId: string, userName: string) => {
|
||||
let failed = false;
|
||||
|
||||
const plans: Plan[] = await dbClient
|
||||
.query('SELECT id, name, folder, lastUpdated FROM plans WHERE ownerId = ? AND deleted = 0 GROUP BY folder,name,id ORDER BY folder ASC,name ASC', [userId])
|
||||
.query('SELECT id, name, folder, lastUpdated FROM plans WHERE BINARY ownerId = ? AND deleted = 0 GROUP BY folder,name,id ORDER BY folder ASC,name ASC', [
|
||||
userId,
|
||||
])
|
||||
.catch((e) => {
|
||||
failed = true;
|
||||
});
|
||||
if (failed) return "Couldn't read DB.";
|
||||
|
||||
const deletedPlans: Plan[] = await dbClient
|
||||
.query('SELECT id, name, folder, lastUpdated FROM plans WHERE ownerId = ? AND deleted = 1 GROUP BY folder,name,id ORDER BY folder ASC,name ASC', [userId])
|
||||
.query('SELECT id, name, folder, lastUpdated FROM plans WHERE BINARY ownerId = ? AND deleted = 1 GROUP BY folder,name,id ORDER BY folder ASC,name ASC', [
|
||||
userId,
|
||||
])
|
||||
.catch(() => {
|
||||
failed = true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user