summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/auth/accept.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/endpoints/auth/accept.ts')
-rw-r--r--src/server/api/endpoints/auth/accept.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/server/api/endpoints/auth/accept.ts b/src/server/api/endpoints/auth/accept.ts
index e98242a3c3..6d4d31fa1e 100644
--- a/src/server/api/endpoints/auth/accept.ts
+++ b/src/server/api/endpoints/auth/accept.ts
@@ -4,7 +4,6 @@ import define from '../../define';
import { ApiError } from '../../error';
import { AuthSessions, AccessTokens, Apps } from '../../../../models';
import { genId } from '../../../../misc/gen-id';
-import { ensure } from '../../../../prelude/ensure';
import { secureRndstr } from '../../../../misc/secure-rndstr';
export const meta = {
@@ -49,7 +48,7 @@ export default define(meta, async (ps, user) => {
if (exist == null) {
// Lookup app
- const app = await Apps.findOne(session.appId).then(ensure);
+ const app = await Apps.findOneOrFail(session.appId);
// Generate Hash
const sha256 = crypto.createHash('sha256');