fully stub out export
This commit is contained in:
4
mod.ts
4
mod.ts
@@ -75,7 +75,7 @@ Deno.serve({ port: config.api.port }, async (req) => {
|
||||
|
||||
return genericResponse(STATUS_CODE.OK, JSON.stringify(plans));
|
||||
} else if (path.startsWith('/export/')) {
|
||||
const userId = path.replace('/list/', '');
|
||||
const userId = path.replace('/export/', '');
|
||||
const userMatch = await dbClient.query('SELECT id FROM users WHERE id = ?', [userId]).catch(() => {
|
||||
failed = true;
|
||||
});
|
||||
@@ -83,7 +83,7 @@ Deno.serve({ port: config.api.port }, async (req) => {
|
||||
if (!userMatch.length) return genericResponse(STATUS_CODE.NotFound, 'User ID does not exist.');
|
||||
|
||||
// WIP: export plans to zip code goes here
|
||||
return genericResponse(STATUS_CODE.NotImplemented, 'WIP');
|
||||
return genericResponse(STATUS_CODE.NotImplemented, 'Export function WIP.');
|
||||
}
|
||||
} else if (req.method === 'POST' && path === '/enroll') {
|
||||
const body = await req.json();
|
||||
|
||||
Reference in New Issue
Block a user