sendou.ink/app/features/api-private/routes/users.ts
Kalle 83d21879bf
Some checks are pending
E2E Tests / e2e (push) Waiting to run
Tests and checks on push / run-checks-and-tests (push) Waiting to run
Updates translation progress / update-translation-progress-issue (push) Waiting to run
Migrate various tournament queries to Kysely (#3135)
2026-06-03 21:05:42 +03:00

15 lines
496 B
TypeScript

import type { ActionFunction } from "react-router";
import * as UserRepository from "~/features/user-page/UserRepository.server";
import { canAccessLohiEndpoint } from "~/utils/remix.server";
export const action: ActionFunction = async ({ request }) => {
if (!canAccessLohiEndpoint(request)) {
throw new Response(null, { status: 403 });
}
// input untyped but we trust Lohi to give us correctly shaped request here
await UserRepository.updateMany(await request.json());
return null;
};