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.

12 lines
429 B

import {Injectable, Middleware, ResponseObject} from '@extollo/lib'
import {Cobalt} from '../../services/Cobalt.service'
@Injectable()
export default class CobaltMiddleware extends Middleware {
async apply(): Promise<ResponseObject> {
// Create new Cobalt instance and inject into the request
const cobalt = this.request.makeNew(Cobalt)
this.request.registerSingletonInstance(Cobalt, cobalt)
}
}