strictNullChecks (#4666)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip
This commit is contained in:
@@ -2,6 +2,7 @@ import { EntityRepository, Repository } from 'typeorm';
|
||||
import { Apps } from '..';
|
||||
import rap from '@prezzemolo/rap';
|
||||
import { AuthSession } from '../entities/auth-session';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
|
||||
@EntityRepository(AuthSession)
|
||||
export class AuthSessionRepository extends Repository<AuthSession> {
|
||||
@@ -9,7 +10,7 @@ export class AuthSessionRepository extends Repository<AuthSession> {
|
||||
src: AuthSession['id'] | AuthSession,
|
||||
me?: any
|
||||
) {
|
||||
const session = typeof src === 'object' ? src : await this.findOne(src);
|
||||
const session = typeof src === 'object' ? src : await this.findOne(src).then(ensure);
|
||||
|
||||
return await rap({
|
||||
id: session.id,
|
||||
|
||||
Reference in New Issue
Block a user