forked from boos/BoosAPI
chore: remove committed local debug artifacts
This commit is contained in:
@@ -1,14 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"id": 58,
|
|
||||||
"account_id": 18,
|
|
||||||
"name": "metapi",
|
|
||||||
"token": "MoKuoMzqsfLbPsZ4RtCJ3uLm2TZALUVwSivGatJQ8UlClPxz",
|
|
||||||
"source": "sync",
|
|
||||||
"enabled": 1,
|
|
||||||
"is_default": 1,
|
|
||||||
"created_at": "2026-03-04T13:00:10.239Z",
|
|
||||||
"updated_at": "2026-03-08T12:45:05.380Z",
|
|
||||||
"token_group": "gemini"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
import Database from 'better-sqlite3';
|
|
||||||
import fs from 'fs';
|
|
||||||
|
|
||||||
const dbPath = './data/hub.db';
|
|
||||||
const db = new Database(dbPath, { readonly: true });
|
|
||||||
|
|
||||||
async function run() {
|
|
||||||
const sites = db.prepare(`SELECT * FROM sites WHERE url LIKE '%openai.api-test.us.ci%'`).all() as any[];
|
|
||||||
if (sites.length === 0) {
|
|
||||||
console.log("No sites found");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const site = sites[0];
|
|
||||||
const accounts = db.prepare(`SELECT * FROM accounts WHERE site_id = ?`).all(site.id) as any[];
|
|
||||||
|
|
||||||
if (accounts.length === 0) {
|
|
||||||
console.log("No accounts found");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const account = accounts[0];
|
|
||||||
const accessToken = account.access_token;
|
|
||||||
|
|
||||||
console.log(`Site: ${site.url}, Platform: ${site.platform}`);
|
|
||||||
console.log(`Access Token: ${accessToken.substring(0, 10)}...`);
|
|
||||||
|
|
||||||
try {
|
|
||||||
const res = await fetch(`${site.url}/api/token/?p=0`, {
|
|
||||||
method: 'GET',
|
|
||||||
headers: {
|
|
||||||
'Authorization': `Bearer ${accessToken}`,
|
|
||||||
'Accept': 'application/json'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const data = await res.json();
|
|
||||||
fs.writeFileSync('tokens_result.json', JSON.stringify({ site, accounts, apiData: data }, null, 2));
|
|
||||||
console.log('Saved result to tokens_result.json');
|
|
||||||
} catch (err: any) {
|
|
||||||
console.error('Fetch error:', err.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
run();
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import Database from 'better-sqlite3';
|
|
||||||
import fs from 'fs';
|
|
||||||
|
|
||||||
const dbPath = './data/hub.db';
|
|
||||||
const db = new Database(dbPath, { readonly: true });
|
|
||||||
|
|
||||||
const tokens = db.prepare(`SELECT * FROM account_tokens WHERE account_id = 18`).all();
|
|
||||||
fs.writeFileSync('account_tokens_18.json', JSON.stringify(tokens, null, 2));
|
|
||||||
console.log('Saved tokens to account_tokens_18.json', tokens.length);
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
import fs from 'fs';
|
|
||||||
|
|
||||||
async function run() {
|
|
||||||
const url = 'https://openai.api-test.us.ci';
|
|
||||||
const accessToken = 'nMld3p6XNa6dB2CjwDKPAnJFb35Z';
|
|
||||||
const userId = '2434';
|
|
||||||
|
|
||||||
try {
|
|
||||||
const res = await fetch(`${url}/api/token/?p=0`, {
|
|
||||||
method: 'GET',
|
|
||||||
headers: {
|
|
||||||
'Authorization': `Bearer ${accessToken}`,
|
|
||||||
'New-Api-User': userId,
|
|
||||||
'Accept': 'application/json'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const data = await res.json();
|
|
||||||
fs.writeFileSync('tokens_result2.json', JSON.stringify({ apiData: data }, null, 2));
|
|
||||||
console.log('Saved result to tokens_result2.json');
|
|
||||||
} catch (err: any) {
|
|
||||||
console.error('Fetch error:', err.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
run();
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
"site": {
|
|
||||||
"id": 17,
|
|
||||||
"name": "api-test.us.ci",
|
|
||||||
"url": "https://openai.api-test.us.ci",
|
|
||||||
"platform": "new-api",
|
|
||||||
"proxy_url": null,
|
|
||||||
"status": "active",
|
|
||||||
"is_pinned": 0,
|
|
||||||
"sort_order": 3,
|
|
||||||
"api_key": "",
|
|
||||||
"created_at": "2026-03-01 11:50:09",
|
|
||||||
"updated_at": "2026-03-01 11:50:09",
|
|
||||||
"global_weight": 1,
|
|
||||||
"external_checkin_url": null,
|
|
||||||
"use_system_proxy": 0,
|
|
||||||
"custom_headers": null
|
|
||||||
},
|
|
||||||
"accounts": [
|
|
||||||
{
|
|
||||||
"id": 18,
|
|
||||||
"site_id": 17,
|
|
||||||
"username": "linuxdo_2434",
|
|
||||||
"access_token": "nMld3p6XNa6dB2CjwDKPAnJFb35Z",
|
|
||||||
"api_token": "MoKuoMzqsfLbPsZ4RtCJ3uLm2TZALUVwSivGatJQ8UlClPxz",
|
|
||||||
"balance": 22.53511,
|
|
||||||
"balance_used": 0.001764,
|
|
||||||
"quota": 22.536874,
|
|
||||||
"unit_cost": null,
|
|
||||||
"value_score": 0,
|
|
||||||
"status": "expired",
|
|
||||||
"is_pinned": 0,
|
|
||||||
"sort_order": 4,
|
|
||||||
"checkin_enabled": 1,
|
|
||||||
"last_checkin_at": "2026-03-16T00:00:01.203Z",
|
|
||||||
"last_balance_refresh": "2026-03-16T00:00:04.473Z",
|
|
||||||
"extra_config": "{\"platformUserId\":2434,\"todayIncomeSnapshot\":{\"day\":\"2026-03-16\",\"baseline\":0,\"latest\":8.970182,\"updatedAt\":\"2026-03-16T00:00:04.473Z\"},\"runtimeHealth\":{\"state\":\"unhealthy\",\"reason\":\"访问令牌失效:无权进行此操作,access token 无效,请在中转站重新生成系统访问令牌后重新绑定账号\",\"source\":\"auth\",\"checkedAt\":\"2026-03-16T00:00:12.099Z\"}}",
|
|
||||||
"created_at": "2026-03-01 11:51:09",
|
|
||||||
"updated_at": "2026-03-16T00:00:12.099Z"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"apiData": {
|
|
||||||
"message": "无权进行此操作,未提供 New-Api-User",
|
|
||||||
"success": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
{
|
|
||||||
"apiData": {
|
|
||||||
"data": {
|
|
||||||
"page": 1,
|
|
||||||
"page_size": 10,
|
|
||||||
"total": 1,
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"id": 6051,
|
|
||||||
"user_id": 2434,
|
|
||||||
"key": "MoKu**********lPxz",
|
|
||||||
"status": 1,
|
|
||||||
"name": "metapi",
|
|
||||||
"created_time": 1772628598,
|
|
||||||
"accessed_time": 1772628683,
|
|
||||||
"expired_time": -1,
|
|
||||||
"remain_quota": -882,
|
|
||||||
"unlimited_quota": true,
|
|
||||||
"model_limits_enabled": false,
|
|
||||||
"model_limits": "",
|
|
||||||
"allow_ips": "",
|
|
||||||
"used_quota": 882,
|
|
||||||
"group": "gemini",
|
|
||||||
"cross_group_retry": false,
|
|
||||||
"DeletedAt": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"message": "",
|
|
||||||
"success": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user