mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-11-12 22:29:53 -06:00
Some checks failed
E2E Tests / e2e (push) Has been cancelled
Tests and checks on push / run-checks-and-tests (push) Has been cancelled
Updates translation progress / update-translation-progress-issue (push) Has been cancelled
E2E Tests / publish-docs-screenshots (push) Has been cancelled
21 lines
624 B
TypeScript
21 lines
624 B
TypeScript
import * as v from "valibot";
|
|
import * as SearchParams from "~/modules/search-params/search-params";
|
|
import { SP } from "~/modules/search-params/search-params";
|
|
|
|
export const logInAsSearchParams = SearchParams.define({
|
|
/** `null` stops impersonating. */
|
|
userId: SP.param(v.nullable(v.pipe(v.number(), v.integer(), v.minValue(1))), {
|
|
loader: true,
|
|
}),
|
|
returnTo: SP.param(v.nullable(v.pipe(v.string(), v.startsWith("/"))), {
|
|
loader: true,
|
|
}),
|
|
});
|
|
|
|
export const usersSearchParams = SearchParams.define({
|
|
ids: SP.param(v.array(v.pipe(v.number(), v.integer(), v.minValue(1))), {
|
|
default: [],
|
|
loader: true,
|
|
}),
|
|
});
|