mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-26 01:09:02 -05:00
* Initial * isMod etc. * canPerformAdminActions * isAdmin * isSupporter * admin override * Lohi * Badge manage with new permissions style * Refactor badge loading logic * Move funcs * Delete permissions.ts * DRY
15 lines
493 B
TypeScript
15 lines
493 B
TypeScript
import type { ActionFunction } from "@remix-run/node";
|
|
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
|
|
UserRepository.updateMany(await request.json());
|
|
|
|
return null;
|
|
};
|