diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-10-16 08:54:36 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-10-16 08:54:36 +0900 |
| commit | 99da4f9839e49c339624e16390a487ed102e96c2 (patch) | |
| tree | b29711378cc130509ac1bd7b847138d96e77421d /src/server/api/endpoints | |
| parent | Refactor (diff) | |
| download | sharkey-99da4f9839e49c339624e16390a487ed102e96c2.tar.gz sharkey-99da4f9839e49c339624e16390a487ed102e96c2.tar.bz2 sharkey-99da4f9839e49c339624e16390a487ed102e96c2.zip | |
Add some tests and some fixes
Diffstat (limited to 'src/server/api/endpoints')
| -rw-r--r-- | src/server/api/endpoints/i/update.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/api/endpoints/i/update.ts b/src/server/api/endpoints/i/update.ts index 77825a4aaa..7b8431f0ee 100644 --- a/src/server/api/endpoints/i/update.ts +++ b/src/server/api/endpoints/i/update.ts @@ -101,7 +101,7 @@ export const meta = { export default async (params: any, user: ILocalUser, app: IApp) => new Promise(async (res, rej) => { const [ps, psErr] = getParams(meta, params); - if (psErr) throw psErr; + if (psErr) return rej(psErr); const isSecure = user != null && app == null; |