mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
chore: fix
This commit is contained in:
parent
2f2c1f263a
commit
191ce0798f
@ -37,7 +37,7 @@ export class NTQQFileApi {
|
||||
}
|
||||
|
||||
async copyFile(filePath: string, destPath: string) {
|
||||
await this.context.wrapper.util.copyFile(filePath, destPath);
|
||||
await this.core.util.copyFile(filePath, destPath);
|
||||
}
|
||||
|
||||
async getFileSize(filePath: string): Promise<number> {
|
||||
|
@ -28,6 +28,7 @@ export class OB11PassiveHttpAdapter implements IOB11NetworkAdapter {
|
||||
this.actionMap.set(action.actionName, action);
|
||||
}
|
||||
registerActionMap(actionMap: Map<string, BaseAction<any, any>>) {
|
||||
|
||||
this.actionMap = actionMap;
|
||||
}
|
||||
registerHeartBeat() {
|
||||
@ -53,8 +54,8 @@ export class OB11PassiveHttpAdapter implements IOB11NetworkAdapter {
|
||||
this.server = http.createServer(this.app);
|
||||
|
||||
this.app.use(express.json());
|
||||
|
||||
this.app.all('/*', this.handleRequest.bind(this));
|
||||
this.app.use(express.urlencoded({ extended: false }));
|
||||
this.app.use('/', (req, res) => this.handleRequest(req, res));
|
||||
|
||||
this.server.listen(this.port, () => {
|
||||
this.coreContext.context.logger.log(`HTTP server listening on port ${this.port}`);
|
||||
@ -85,5 +86,6 @@ export class OB11PassiveHttpAdapter implements IOB11NetworkAdapter {
|
||||
this.isOpen = false;
|
||||
this.hasBeenClosed = true;
|
||||
this.server?.close();
|
||||
this.app = undefined;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user