fix lint
This commit is contained in:
parent
0abe2dfee0
commit
c69b72e199
573 changed files with 3318 additions and 3318 deletions
|
|
@ -15,7 +15,7 @@ export const meta = {
|
|||
|
||||
token: {
|
||||
validator: $.str,
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
|
|
@ -32,34 +32,34 @@ export const meta = {
|
|||
optional: false as const, nullable: false as const,
|
||||
ref: 'User',
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchApp: {
|
||||
message: 'No such app.',
|
||||
code: 'NO_SUCH_APP',
|
||||
id: 'fcab192a-2c5a-43b7-8ad8-9b7054d8d40d'
|
||||
id: 'fcab192a-2c5a-43b7-8ad8-9b7054d8d40d',
|
||||
},
|
||||
|
||||
noSuchSession: {
|
||||
message: 'No such session.',
|
||||
code: 'NO_SUCH_SESSION',
|
||||
id: '5b5a1503-8bc8-4bd0-8054-dc189e8cdcb3'
|
||||
id: '5b5a1503-8bc8-4bd0-8054-dc189e8cdcb3',
|
||||
},
|
||||
|
||||
pendingSession: {
|
||||
message: 'This session is not completed yet.',
|
||||
code: 'PENDING_SESSION',
|
||||
id: '8c8a4145-02cc-4cca-8e66-29ba60445a8e'
|
||||
}
|
||||
}
|
||||
id: '8c8a4145-02cc-4cca-8e66-29ba60445a8e',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
// Lookup app
|
||||
const app = await Apps.findOne({
|
||||
secret: ps.appSecret
|
||||
secret: ps.appSecret,
|
||||
});
|
||||
|
||||
if (app == null) {
|
||||
|
|
@ -69,7 +69,7 @@ export default define(meta, async (ps) => {
|
|||
// Fetch token
|
||||
const session = await AuthSessions.findOne({
|
||||
token: ps.token,
|
||||
appId: app.id
|
||||
appId: app.id,
|
||||
});
|
||||
|
||||
if (session == null) {
|
||||
|
|
@ -83,7 +83,7 @@ export default define(meta, async (ps) => {
|
|||
// Lookup access token
|
||||
const accessToken = await AccessTokens.findOneOrFail({
|
||||
appId: app.id,
|
||||
userId: session.userId
|
||||
userId: session.userId,
|
||||
});
|
||||
|
||||
// Delete session
|
||||
|
|
@ -92,7 +92,7 @@ export default define(meta, async (ps) => {
|
|||
return {
|
||||
accessToken: accessToken.token,
|
||||
user: await Users.pack(session.userId, null, {
|
||||
detail: true
|
||||
})
|
||||
detail: true,
|
||||
}),
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue