重构后端,完善获取资源/下载列表、博客列表接口

This commit is contained in:
2024-08-29 21:59:55 +08:00
parent 2a005b2e14
commit bc99fba385
18 changed files with 486 additions and 193 deletions

View File

@@ -0,0 +1,16 @@
import Logger from "../Logger";
abstract class API {
protected logger: Logger;
public middlewareFunc: Function[] = [];
constructor(public method: string, public uri: string, ...func: any) {
this.logger = new Logger('API][' + method + '][' + uri);
this.middlewareFunc.push(...func);
}
// to override
public abstract onRequset(data: any, res: any): void;
}
export { API };