mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-21 13:25:14 +02:00
working on the frontend, adding torrent page, working on show directory, working on the api
This commit is contained in:
5
web/src/params/integer.ts
Normal file
5
web/src/params/integer.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import type {ParamMatcher} from '@sveltejs/kit';
|
||||
|
||||
export const match = ((param: string) => {
|
||||
return Number.isInteger(parseInt(param, 10));
|
||||
}) satisfies ParamMatcher;
|
||||
6
web/src/params/uuid.ts
Normal file
6
web/src/params/uuid.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import type {ParamMatcher} from '@sveltejs/kit';
|
||||
import {validate as uuidValidate} from 'uuid';
|
||||
|
||||
export const match = ((param: string) => {
|
||||
return uuidValidate(param);
|
||||
}) satisfies ParamMatcher;
|
||||
Reference in New Issue
Block a user