fix schema and add nullable

This commit is contained in:
Darius
2026-02-05 01:06:51 +01:00
parent 6b5b7a037d
commit 7fd3e4b9d3
2 changed files with 4 additions and 7 deletions

View File

@@ -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<API_HA_DeskPosition>().nullable(),
ha_temp: z.string().nullable(),
tidal_current: z.custom<TidalGetCurrent>().nullable(),
}),
418: z.object({
error: z.string(),

View File

@@ -1,5 +1,4 @@
import {
BaseClient,
BaseService,
FullInformation,
HomeAssistantDeskPositionResult,