fix: HIGH issues #12,#15,#16,#17,#21 — backend persistence for import/layers/blocks + owner filtering
This commit is contained in:
@@ -73,7 +73,10 @@ export class SqliteAdapter implements DatabaseInterface {
|
||||
}
|
||||
|
||||
// ─── Projects ──────────────────────────────────────
|
||||
listProjects(): DBProject[] {
|
||||
listProjects(ownerId?: string): DBProject[] {
|
||||
if (ownerId) {
|
||||
return this.db.prepare('SELECT * FROM projects WHERE owner_id = ? ORDER BY updated_at DESC').all(ownerId) as DBProject[];
|
||||
}
|
||||
return this.db.prepare('SELECT * FROM projects ORDER BY updated_at DESC').all() as DBProject[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user