Fix external service authentication (#4846)

This commit is contained in:
Satsuki Yanagi
2019-05-03 18:38:19 +09:00
committed by syuilo
parent 9d1ed1eb0d
commit 0e764a2b3e
5 changed files with 35 additions and 24 deletions

View File

@@ -203,12 +203,8 @@ router.get('/dc/cb', async ctx => {
}
const profile = await UserProfiles.createQueryBuilder()
.where('discord @> :discord', {
discord: {
id: id,
},
})
.andWhere('userHost IS NULL')
.where('"discordId" = :id', { id: id })
.andWhere('"userHost" IS NULL')
.getOne();
if (profile == null) {