协议修改
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { ApiClient } from "../client/ApiClient";
|
||||
import type { Endpoint } from "../client/endpoints";
|
||||
import type { ApiResponse } from "../client/types";
|
||||
import proto from "db://assets/Scripts/proto/proto.pb.js";
|
||||
import type { ICommonService } from "./ICommonService";
|
||||
|
||||
export class HttpCommonService implements ICommonService {
|
||||
constructor(private api = ApiClient.I) {}
|
||||
|
||||
// 获取配置
|
||||
async reqResConfig(req: proto.cs.ICSGetResConfigReq): Promise<ApiResponse<proto.cs.ICSGetResConfigRes>> {
|
||||
const ep: Endpoint<proto.cs.ICSGetResConfigReq, proto.cs.ICSGetResConfigRes> = {
|
||||
path: "api/logic/getResConfig",
|
||||
method: "POST",
|
||||
codec: "json",
|
||||
needsAuth: true,
|
||||
};
|
||||
return this.api.call(ep, req);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user