refactor: resolve #7139
This commit is contained in:
parent
ebadd7fd3f
commit
91172654e4
76 changed files with 107 additions and 221 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue