deb
This commit is contained in:
parent
d926db41bd
commit
c221ee8cb2
1 changed files with 2 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ import { DataSource, EntityManager } from "typeorm"
|
||||||
import { Application } from "./entity/Application.js"
|
import { Application } from "./entity/Application.js"
|
||||||
import UserStorage from './userStorage.js';
|
import UserStorage from './userStorage.js';
|
||||||
import { ApplicationUser } from './entity/ApplicationUser.js';
|
import { ApplicationUser } from './entity/ApplicationUser.js';
|
||||||
|
import { getLogger } from '../helpers/logger.js';
|
||||||
export default class {
|
export default class {
|
||||||
DB: DataSource | EntityManager
|
DB: DataSource | EntityManager
|
||||||
userStorage: UserStorage
|
userStorage: UserStorage
|
||||||
|
|
@ -74,6 +75,7 @@ export default class {
|
||||||
async GetApplicationUser(application: Application, userIdentifier: string, entityManager = this.DB): Promise<ApplicationUser> {
|
async GetApplicationUser(application: Application, userIdentifier: string, entityManager = this.DB): Promise<ApplicationUser> {
|
||||||
const found = await this.GetApplicationUserIfExists(application, userIdentifier, entityManager)
|
const found = await this.GetApplicationUserIfExists(application, userIdentifier, entityManager)
|
||||||
if (!found) {
|
if (!found) {
|
||||||
|
getLogger({ appName: application.name })("user", userIdentifier, "not found")
|
||||||
throw new Error(`application user not found`)
|
throw new Error(`application user not found`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue