temp
This commit is contained in:
parent
cabe83d07d
commit
164553abf0
@ -14,14 +14,14 @@ router["POST /qb/saveQbInfo"] = async function (ctx: Context) {
|
||||
* 获取qb配置
|
||||
*/
|
||||
router["GET /qb/config"] = async function (ctx: Context) {
|
||||
ctx.body = await service.getAddress();
|
||||
ctx.body = await service.getConfig();
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取qb配置
|
||||
*/
|
||||
router["GET /qb/bt/list"] = async function (ctx: Context) {
|
||||
ctx.body = await service.getAddress();
|
||||
ctx.body = await service.getBtList();
|
||||
};
|
||||
|
||||
|
||||
|
@ -20,17 +20,19 @@ class QbService {
|
||||
body.version = body ? (await get("/app/version", null)) : null;
|
||||
return body;
|
||||
}
|
||||
|
||||
a
|
||||
/**
|
||||
* 获取当前配置
|
||||
*/
|
||||
static async getAddress(): Promise<QbConfigDto> {
|
||||
static async getConfig(): Promise<QbConfigDto> {
|
||||
return getQbInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* get torrents list from qb
|
||||
*/
|
||||
static async getBtList(): Promise<Array<BtListItemDto>> {
|
||||
let res = await get("/api/v2/torrents/info?category=&sort=added_on", null);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
{{ data.qbConfig.version ? data.qbConfig.version : "配置错误,无法访问" }}
|
||||
</el-form-item>
|
||||
<el-form-item label="访问地址">
|
||||
<el-input type="text" v-model="data.qbConfig.address" placeholder="qb访问地址"/>
|
||||
<el-input type="text" v-model="data.qbConfig.address" placeholder="例如:http://localhost:8080(仅支持v4.1及以上)"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名">
|
||||
<el-input type="text" v-model="data.qbConfig.username" placeholder="qb访问用户名"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user