// api/admin-devices.prg — Format admin devices list // ctx: rows (JSON) FUNCTION Main() LOCAL aRows := hb_jsonDecode(ctx_get("rows", "[]")) IF ! HB_ISARRAY(aRows) ; aRows := {} ; ENDIF AP_JSONRESPONSE({ "devices" => aRows }) RETURN NIL