手动输入CK&用户删除

#126
This commit is contained in:
目棃
2024-09-22 19:14:09 +08:00
parent c8724ee664
commit fc43ed15d0
3 changed files with 154 additions and 6 deletions

View File

@@ -216,6 +216,18 @@ async function saveGameAccount(
}
}
/**
* @description 删除游戏账户数据
* @since Beta v0.6.0
* @param {string} uid - 米社UID
* @returns {Promise<void>}
*/
async function deleteAccount(uid: string): Promise<void> {
const db = await TGSqlite.getDB();
await db.execute("DELETE FROM GameAccount WHERE uid = ?;", [uid]);
await db.execute("DELETE FROM UserAccount WHERE uid = ?;", [uid]);
}
const TSUserAccount = {
account: {
getAllUid: getAllAccountId,
@@ -223,6 +235,7 @@ const TSUserAccount = {
getAccount: getUserAccount,
saveAccount,
copy: copyCookie,
deleteAccount,
},
game: {
getAccount: getGameAccount,