Update response from /sync/reads to be an array

This commit is contained in:
jack1142
2021-08-20 21:19:18 +00:00
parent 21a4abced0
commit 3307df42b2
+8 -2
View File
@@ -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
//#endregion