mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-08 04:05:54 -05:00
Allow mods to migrate users Closes #1825
This commit is contained in:
@@ -22,7 +22,7 @@ export const action = async ({ request }: ActionFunctionArgs) => {
|
||||
|
||||
switch (data._action) {
|
||||
case "MIGRATE": {
|
||||
validate(isAdmin(user), "Admin needed", 401);
|
||||
validate(isMod(user), "Admin needed", 401);
|
||||
|
||||
await AdminRepository.migrate({
|
||||
oldUserId: data["old-user"],
|
||||
|
||||
@@ -46,7 +46,7 @@ export default function AdminPage() {
|
||||
{process.env.NODE_ENV !== "production" || isAdmin(user) ? (
|
||||
<Impersonate />
|
||||
) : null}
|
||||
{isAdmin(user) ? <MigrateUser /> : null}
|
||||
{isMod(user) ? <MigrateUser /> : null}
|
||||
{isAdmin(user) ? <ForcePatron /> : null}
|
||||
{isMod(user) ? <BanUser /> : null}
|
||||
{isMod(user) ? <UnbanUser /> : null}
|
||||
|
||||
Reference in New Issue
Block a user