From 3307df42b27875ac73ab80a690e1657ab96d43c5 Mon Sep 17 00:00:00 2001 From: jack1142 <84-jack1142@users.noreply.gitlab.insrt.uk> Date: Fri, 20 Aug 2021 21:19:18 +0000 Subject: [PATCH] Update response from `/sync/reads` to be an array --- src/routes/misc.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/routes/misc.ts b/src/routes/misc.ts index 330e883..08a9e43 100644 --- a/src/routes/misc.ts +++ b/src/routes/misc.ts @@ -102,7 +102,13 @@ resource('/sync/unreads', { post: routeAuthenticated( "Fetch Unreads", "Fetch information about unread state on channels.", - await success("Unreads Data", ref("ChannelUnread")) + await success( + "Array of Unreads Data", + schema` + import type { ChannelUnread } from "./Sync"; + type ${'FetchUnreads'} = ChannelUnread[]; + ` + ) ) }); //#endregion @@ -128,4 +134,4 @@ resource('/push/unsubscribe', { await noContent("Unsubscribed successfully.") ) }); -//#endregion \ No newline at end of file +//#endregion