auth/utils.ts: Fix type of done callback 🐛

Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
David Mehren 2020-04-13 14:56:53 +02:00
parent 5d3c636c14
commit cc5db72369
No known key found for this signature in database
GPG key ID: 6017AF117F9756CB

View file

@ -2,10 +2,10 @@ import { User } from '../../models'
import { logger } from '../../logger'
export function passportGeneralCallback (
accessToken,
refreshToken,
profile,
done: (err: any, user: User | null) => void
accessToken: string,
refreshToken: string,
profile: any,
done: (err?: Error | null, user?: User) => void
): void {
const stringifiedProfile = JSON.stringify(profile)
User.findOrCreate({
@ -44,6 +44,6 @@ export function passportGeneralCallback (
}
}).catch(function (err) {
logger.error('auth callback failed: ' + err)
return done(err, null)
return done(err, undefined)
})
}