dev: add logging to Inspect

feat/axum
Tomáš Mládek 2023-09-09 12:09:56 +02:00
parent d9b714e106
commit 474e685941
1 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,8 @@
import InspectGroups from "./InspectGroups.svelte";
import InspectTypeEditor from "./InspectTypeEditor.svelte";
import LabelBorder from "./utils/LabelBorder.svelte";
import { debug } from "debug";
const dbg = debug("kestrel:Inspect");
const dispatch = createEventDispatcher();
const params = useParams();
@ -189,6 +191,7 @@
}
async function onChange(ev: CustomEvent<WidgetChange>) {
dbg("onChange", ev.detail);
const change = ev.detail;
switch (change.type) {
case "create":
@ -328,6 +331,7 @@
$: entity.subscribe(async (object) => {
if (object && object.listing.entries.length) {
dbg("Updating visit stats for %o", object);
await api.putEntityAttribute(
object.address,
"LAST_VISITED",