mirror of
https://github.com/zoriya/flood.git
synced 2025-12-06 07:16:18 +00:00
server: redirect to a portable link for /data endpoint
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {array, boolean, object, record, string} from 'zod';
|
||||
import {array, boolean, number, object, record, string} from 'zod';
|
||||
import {noComma} from '../../util/regEx';
|
||||
|
||||
import type {infer as zodInfer} from 'zod';
|
||||
@@ -62,3 +62,16 @@ export const setTorrentsTagsSchema = object({
|
||||
});
|
||||
|
||||
export type SetTorrentsTagsOptions = zodInfer<typeof setTorrentsTagsSchema>;
|
||||
|
||||
// GET /api/torrents/{hash}/contents/{indices}/data
|
||||
export const contentTokenSchema = object({
|
||||
username: string(),
|
||||
hash: string(),
|
||||
indices: string(),
|
||||
// issued at
|
||||
iat: number(),
|
||||
// expiration
|
||||
exp: number(),
|
||||
});
|
||||
|
||||
export type ContentToken = zodInfer<typeof contentTokenSchema>;
|
||||
|
||||
Reference in New Issue
Block a user