mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
chore: fix
This commit is contained in:
@@ -37,7 +37,7 @@ export class NTQQFileApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async copyFile(filePath: string, destPath: string) {
|
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> {
|
async getFileSize(filePath: string): Promise<number> {
|
||||||
|
@@ -28,6 +28,7 @@ export class OB11PassiveHttpAdapter implements IOB11NetworkAdapter {
|
|||||||
this.actionMap.set(action.actionName, action);
|
this.actionMap.set(action.actionName, action);
|
||||||
}
|
}
|
||||||
registerActionMap(actionMap: Map<string, BaseAction<any, any>>) {
|
registerActionMap(actionMap: Map<string, BaseAction<any, any>>) {
|
||||||
|
|
||||||
this.actionMap = actionMap;
|
this.actionMap = actionMap;
|
||||||
}
|
}
|
||||||
registerHeartBeat() {
|
registerHeartBeat() {
|
||||||
@@ -53,8 +54,8 @@ export class OB11PassiveHttpAdapter implements IOB11NetworkAdapter {
|
|||||||
this.server = http.createServer(this.app);
|
this.server = http.createServer(this.app);
|
||||||
|
|
||||||
this.app.use(express.json());
|
this.app.use(express.json());
|
||||||
|
this.app.use(express.urlencoded({ extended: false }));
|
||||||
this.app.all('/*', this.handleRequest.bind(this));
|
this.app.use('/', (req, res) => this.handleRequest(req, res));
|
||||||
|
|
||||||
this.server.listen(this.port, () => {
|
this.server.listen(this.port, () => {
|
||||||
this.coreContext.context.logger.log(`HTTP server listening on port ${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.isOpen = false;
|
||||||
this.hasBeenClosed = true;
|
this.hasBeenClosed = true;
|
||||||
this.server?.close();
|
this.server?.close();
|
||||||
|
this.app = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user