css and some nav

This commit is contained in:
ntr committed 2022-08-10 23:47:33 +10:00
1 parent a8e5e5d7cd
commit 9a42c290ae
10 files changed
+273 -195

No files matched your search

+12 -12
View File
@@ -22,17 +22,17 @@ export default function createApi(log: Log, pg: Pg, discogs) {
const app = new koa();
const server = http.createServer(app.callback());
// app.use(async (ctx, next) => {
// try {
// await next();
// } catch (err) {
// log.error(err);
// ctx.status = err.statusCode || err.status || 500;
// ctx.body = {
// message: err.message
// };
// }
// });
app.use(async (ctx, next) => {
try {
await next();
} catch (err) {
log.error(err);
ctx.status = err.statusCode || err.status || 500;
ctx.body = {
error: err.message
};
}
});
const router = koaRouter();
@@ -128,7 +128,7 @@ export default function createApi(log: Log, pg: Pg, discogs) {
const { id } = ctx.request.params;
const user = await pg.userFindId(id);
// if (!user) return ctx.response.status = 404;
ctx.assert(user, 404, `user ${id} not found`);
const bundles = (await getBundles())
.map(b => {