From 7fd3e4b9d34262d8b1e5e297897148e46889dba3 Mon Sep 17 00:00:00 2001 From: Darius Date: Thu, 5 Feb 2026 01:06:51 +0100 Subject: [PATCH] fix schema and add nullable --- src/homepage/routes.ts | 10 ++++------ src/homepage/service.ts | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/homepage/routes.ts b/src/homepage/routes.ts index 28465fb..8de3694 100644 --- a/src/homepage/routes.ts +++ b/src/homepage/routes.ts @@ -3,6 +3,7 @@ import { z } from "zod"; import type { TidalService } from "../tidal/service.js"; import { HomeAssistantService } from "../homeassistant/service.js"; import { HomepageService } from "./service.js"; +import { API_HA_DeskPosition, TidalGetCurrent } from "@dpu/shared"; export async function homepageRoutes( fastify: FastifyInstance, @@ -25,12 +26,9 @@ export async function homepageRoutes( tags: ["homepage"], response: { 200: z.object({ - title: z.string(), - artists: z.string(), - status: z.string(), - current: z.string(), - duration: z.string(), - url: z.string(), + ha_desk_position: z.custom().nullable(), + ha_temp: z.string().nullable(), + tidal_current: z.custom().nullable(), }), 418: z.object({ error: z.string(), diff --git a/src/homepage/service.ts b/src/homepage/service.ts index ab72a03..77957b4 100644 --- a/src/homepage/service.ts +++ b/src/homepage/service.ts @@ -1,5 +1,4 @@ import { - BaseClient, BaseService, FullInformation, HomeAssistantDeskPositionResult,