You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
528 B

import {Config, Inject, ORMUser, Singleton, Unit} from '@extollo/lib'
import {User} from './models/User.model'
import {Gotify} from 'gotify'
@Singleton()
export class AppUnit extends Unit {
@Inject()
protected readonly config!: Config
async up(): Promise<void> {
this.container().registerStaticOverride(ORMUser, User)
const gotify = new Gotify({
server: this.config.safe('gotify.server').string(),
})
this.container().registerSingletonInstance(Gotify, gotify)
}
}