rem excess logs
This commit is contained in:
1
mod.ts
1
mod.ts
@@ -29,7 +29,6 @@ Deno.serve({ port: config.api.port }, async (req) => {
|
|||||||
let rawPath = (urlPath.split('api')[1] ?? '').trim();
|
let rawPath = (urlPath.split('api')[1] ?? '').trim();
|
||||||
if (rawPath.endsWith('/')) rawPath = rawPath.slice(0, -1);
|
if (rawPath.endsWith('/')) rawPath = rawPath.slice(0, -1);
|
||||||
const path = rawPath;
|
const path = rawPath;
|
||||||
console.log(urlPath, path);
|
|
||||||
|
|
||||||
let failed = false;
|
let failed = false;
|
||||||
if (req.method === 'GET') {
|
if (req.method === 'GET') {
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ export default async (userId: string, userName: string) => {
|
|||||||
const plans: Plan[] = await dbClient
|
const plans: Plan[] = await dbClient
|
||||||
.query('SELECT id, name, folder FROM plans WHERE ownerId = ? AND deleted = 0 GROUP BY folder,name,id ORDER BY folder ASC,name ASC', [userId])
|
.query('SELECT id, name, folder FROM plans WHERE ownerId = ? AND deleted = 0 GROUP BY folder,name,id ORDER BY folder ASC,name ASC', [userId])
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.error(e);
|
|
||||||
failed = true;
|
failed = true;
|
||||||
});
|
});
|
||||||
if (failed) return "Couldn't read DB.";
|
if (failed) return "Couldn't read DB.";
|
||||||
|
|||||||
Reference in New Issue
Block a user