Starting on working bookmarks api

This commit is contained in:
2022-06-27 09:01:36 -05:00
parent 4c37658cd8
commit 6fe79a1892
13 changed files with 652 additions and 58 deletions

12
web/lib/apiHelpers.js Normal file
View File

@@ -0,0 +1,12 @@
function withErrorHandling(handler) {
return async (req, res) => {
try {
await handler(req, res);
} catch (error) {
console.error(error);
res.status(error.status || 500).end(error.message);
}
};
}
export { withErrorHandling };