fix: incorrect API used in validation

This commit is contained in:
alikia2x (寒寒) 2025-03-31 06:24:54 +08:00
parent 7a46f31d7f
commit cfd4fc3d21
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6
2 changed files with 2 additions and 2 deletions

View File

@ -17,4 +17,4 @@ export default {
fetch,
} satisfies Deno.ServeDefaultExport;
export const VERSION = "0.2.3";
export const VERSION = "0.2.4";

View File

@ -47,7 +47,7 @@ export const getSnapshotsHanlder = createHandlers(async (c: ContextType) => {
if (videoId.startsWith("av")) {
videoId = parseInt(videoId.slice(2));
}
else if (await number().validate(videoId)) {
else if (await number().isValid(videoId)) {
videoId = parseInt(videoId);
}
const queryParams = await SnapshotQueryParamsSchema.validate(c.req.query());