♻️ include build when getting product udpates

This commit is contained in:
Fred KISSIE
2025-11-07 20:05:51 +01:00
parent aa3f07f1ba
commit 0745734273

View File

@@ -6,9 +6,9 @@ import type ResponseT from "@server/types/Response";
export type ProductUpdate = { export type ProductUpdate = {
link: string | null; link: string | null;
edition: "enterprise" | "community" | "cloud" | null; build: "enterprise" | "oss" | "saas" | null;
id: number; id: number;
type: "Update" | "Important" | "New"; type: "Update" | "Important" | "New" | "Warning";
title: string; title: string;
contents: string; contents: string;
publishedAt: Date; publishedAt: Date;
@@ -19,8 +19,11 @@ export const productUpdatesQueries = {
list: queryOptions({ list: queryOptions({
queryKey: ["PRODUCT_UPDATES"] as const, queryKey: ["PRODUCT_UPDATES"] as const,
queryFn: async ({ signal }) => { queryFn: async ({ signal }) => {
const sp = new URLSearchParams({
build
});
const data = await remote.get<ResponseT<ProductUpdate[]>>( const data = await remote.get<ResponseT<ProductUpdate[]>>(
"/product-updates", `/product-updates?${sp.toString()}`,
{ signal } { signal }
); );
return data.data; return data.data;