2023-07-28 20:12:34 +08:00
|
|
|
import {Context} from "koa";
|
2022-12-02 11:04:17 +08:00
|
|
|
import service from "../service/QbService";
|
|
|
|
|
|
|
|
const router = {};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取单个配置
|
|
|
|
*/
|
|
|
|
router["POST /qb/saveQbInfo"] = async function (ctx: Context) {
|
2023-07-28 20:12:34 +08:00
|
|
|
ctx.body = await service.saveAddress(ctx.request.body);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取qb配置
|
|
|
|
*/
|
|
|
|
router["GET /qb/config"] = async function (ctx: Context) {
|
|
|
|
ctx.body = await service.getAddress();
|
2022-12-02 11:04:17 +08:00
|
|
|
};
|
|
|
|
|
2023-10-11 17:34:26 +08:00
|
|
|
/**
|
|
|
|
* 获取qb配置
|
|
|
|
*/
|
|
|
|
router["GET /qb/bt/list"] = async function (ctx: Context) {
|
|
|
|
ctx.body = await service.getAddress();
|
|
|
|
};
|
|
|
|
|
2022-12-02 11:04:17 +08:00
|
|
|
|
|
|
|
export default router;
|