Merge branch 'jack1142-master-patch-82501' into 'master'

Update response from `/sync/reads` to be an array

See merge request revolt/api!6
This commit is contained in:
insert
2021-08-23 11:50:01 +00:00
+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