mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
✅ test(api): 测试请求,果然没跑通
This commit is contained in:
@@ -67,6 +67,21 @@ class TGSqlite {
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取应用数据某一项
|
||||
* @memberof TGSqlite
|
||||
* @since Alpha v0.2.0
|
||||
* @param {string} key
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
public async getAppDataItem (key: string): Promise<string> {
|
||||
const db = await Database.load(this.dbPath);
|
||||
const sql = `SELECT value FROM AppData WHERE key='${key}';`;
|
||||
const res: Array<{ value: string }> = await db.select(sql);
|
||||
await db.close();
|
||||
return res[0].value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 输入 cookie
|
||||
* @memberof TGSqlite
|
||||
|
||||
Reference in New Issue
Block a user