feat(devices): repo returns + patches icon
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user