feat(devices): repo returns + patches icon

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
root
2026-06-09 08:26:44 +10:00
parent 59aba14ef7
commit 1626b3f80d

View File

@@ -1,6 +1,6 @@
import { pool } from '../pool.js'; import { pool } from '../pool.js';
const COLS = 'mac, ip, vendor, name, grp, note, status, randomized, flagged, first_seen, last_seen, present'; const COLS = 'mac, ip, vendor, name, grp, note, status, randomized, flagged, first_seen, last_seen, present, icon';
export async function listKnown() { export async function listKnown() {
const { rows } = await pool.query( const { rows } = await pool.query(
@@ -70,7 +70,7 @@ export async function prune() {
return rowCount; return rowCount;
} }
const PATCHABLE = ['name', 'grp', 'note', 'status', 'flagged']; const PATCHABLE = ['name', 'grp', 'note', 'status', 'flagged', 'icon'];
export async function update(mac, patch) { export async function update(mac, patch) {
const sets = [], vals = []; const sets = [], vals = [];
for (const k of PATCHABLE) { for (const k of PATCHABLE) {