summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/notes.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-10-26 08:36:50 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-10-26 08:36:50 +0900
commit5b1cd3bd3cb1b18172946276ae3dea03ec0531ea (patch)
treef2ca0d77d988b9a06d789a37a699992d41ae3c52 /src/server/api/endpoints/notes.ts
parentBump @types/mocha from 5.2.3 to 5.2.5 (#3006) (diff)
downloadsharkey-5b1cd3bd3cb1b18172946276ae3dea03ec0531ea.tar.gz
sharkey-5b1cd3bd3cb1b18172946276ae3dea03ec0531ea.tar.bz2
sharkey-5b1cd3bd3cb1b18172946276ae3dea03ec0531ea.zip
Fix bug
Diffstat (limited to 'src/server/api/endpoints/notes.ts')
-rw-r--r--src/server/api/endpoints/notes.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/api/endpoints/notes.ts b/src/server/api/endpoints/notes.ts
index d65710d33f..4f5a211240 100644
--- a/src/server/api/endpoints/notes.ts
+++ b/src/server/api/endpoints/notes.ts
@@ -56,7 +56,7 @@ export const meta = {
export default (params: any) => new Promise(async (res, rej) => {
const [ps, psErr] = getParams(meta, params);
- if (psErr) throw psErr;
+ if (psErr) return rej(psErr);
// Check if both of sinceId and untilId is specified
if (ps.sinceId && ps.untilId) {