21 lines
731 B
TypeScript
21 lines
731 B
TypeScript
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 { IThemeService } from "./IThemeService";
|
|
|
|
export class HttpThemeService implements IThemeService {
|
|
constructor(private api = ApiClient.I) {}
|
|
|
|
// 获取大厅分类列表
|
|
async reqHallTheme(req: proto.cs.ICSHallThemeReq): Promise<ApiResponse<proto.cs.ICSHallThemeRes>> {
|
|
const ep: Endpoint<proto.cs.ICSHallThemeReq, proto.cs.ICSHallThemeRes> = {
|
|
path: "api/logic/hallTheme",
|
|
method: "POST",
|
|
codec: "json",
|
|
needsAuth: true,
|
|
};
|
|
return this.api.call(ep, req);
|
|
}
|
|
}
|