API: torrents: add /reannounce

This commit is contained in:
Jesse Chan
2021-02-10 22:00:14 +08:00
parent 2c8c7a4f3d
commit 00ab541701
3 changed files with 50 additions and 3 deletions
+8
View File
@@ -63,6 +63,14 @@ export const setTorrentsTagsSchema = object({
export type SetTorrentsTagsOptions = zodInfer<typeof setTorrentsTagsSchema>;
// POST /api/torrents/reannounce
export const reannounceTorrentsSchema = object({
// An array of string representing hashes of torrents to be reannounced
hashes: array(string()).nonempty(),
});
export type ReannounceTorrentsOptions = zodInfer<typeof reannounceTorrentsSchema>;
// GET /api/torrents/{hash}/contents/{indices}/data
export const contentTokenSchema = object({
username: string(),