small fixes

This commit is contained in:
Ren Amamiya
2023-08-18 17:42:25 +07:00
parent 5626579b3f
commit c85502e427
10 changed files with 236 additions and 226 deletions

View File

@@ -101,10 +101,11 @@ export class LumeStorage {
}
public async getWidgets() {
const result: Array<Widget> = await this.db.select(
`SELECT * FROM widgets WHERE account_id = "${this.account.id}" ORDER BY created_at DESC;`
const widgets: Array<Widget> = await this.db.select(
'SELECT * FROM widgets WHERE account_id = $1 ORDER BY created_at DESC;',
[this.account.id]
);
return result;
return widgets;
}
public async createWidget(kind: number, title: string, content: string | string[]) {