mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-27 03:58:02 -05:00
auth/utils.ts: Fix type of done callback 🐛
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
5d3c636c14
commit
cc5db72369
1 changed files with 5 additions and 5 deletions
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue