mirror of
https://github.com/wassname/talk.git
synced 2026-07-07 20:46:58 +08:00
22 lines
496 B
TypeScript
22 lines
496 B
TypeScript
import { Db } from "mongodb";
|
|
|
|
import { Config } from "talk-common/config";
|
|
import CommonContext from "talk-server/graph/common/context";
|
|
import { Request } from "talk-server/types/express";
|
|
|
|
export interface ManagementContextOptions {
|
|
mongo: Db;
|
|
config: Config;
|
|
req?: Request;
|
|
}
|
|
|
|
export default class ManagementContext extends CommonContext {
|
|
public mongo: Db;
|
|
|
|
constructor({ req, mongo, config }: ManagementContextOptions) {
|
|
super({ req, config });
|
|
|
|
this.mongo = mongo;
|
|
}
|
|
}
|