wip: settings screen

This commit is contained in:
2023-11-16 17:48:29 +07:00
parent 6dc4e1cde6
commit 954b729dc9
16 changed files with 548 additions and 78 deletions

View File

@@ -435,6 +435,14 @@ export class LumeStorage {
);
}
public async getAllSettings() {
const results: { key: string; value: string }[] = await this.db.select(
'SELECT * FROM settings ORDER BY id DESC;'
);
if (results.length < 1) return null;
return results;
}
public async getSettingValue(key: string) {
const results: { key: string; value: string }[] = await this.db.select(
'SELECT * FROM settings WHERE key = $1 ORDER BY id DESC LIMIT 1;',