mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-03-26 05:09:52 +08:00
refactor(bgi_tools): 优化pullJsonConfig函数的参数传递方式
- 将uid参数从请求体改为URL查询参数 - 简化HTTP请求调用方式 - 移除不必要的JSON序列化操作 - 保留调试日志功能
This commit is contained in:
@@ -7,9 +7,8 @@ import {config} from "../config/config";
|
||||
* @returns {Promise<HttpResponse>}
|
||||
*/
|
||||
async function pullJsonConfig(uid, http_api) {
|
||||
const res = await http.request("GET", http_api, JSON.stringify({
|
||||
uid: uid,
|
||||
})
|
||||
http_api += "?uid=" + uid
|
||||
const res = await http.request("GET", http_api
|
||||
// , JSON.stringify({"Content-Type": "application/json"})
|
||||
)
|
||||
log.debug(`[{0}]res=>{1}`, 'next', JSON.stringify(res))
|
||||
|
||||
Reference in New Issue
Block a user