chore: pnpm run format
This commit is contained in:
1 parent
5def756cc8
commit
1068a82d03
3 files changed
+14
-11
No files matched your search
@@ -45,7 +45,10 @@ export async function POST(request: Request) {
|
||||
const twoFactor = await prisma.client.twoFactorAuth.findUnique({ where: { userId } });
|
||||
|
||||
if (!twoFactor?.isEnabled) {
|
||||
return badRequest({ code: 'two-factor-error-not-enabled', message: '2FA not enabled for this user' });
|
||||
return badRequest({
|
||||
code: 'two-factor-error-not-enabled',
|
||||
message: '2FA not enabled for this user',
|
||||
});
|
||||
}
|
||||
|
||||
const rateCheck = await checkRateLimit(userId);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
import { useRef, ClipboardEvent, KeyboardEvent } from 'react';
|
||||
import {Row, TextField} from '@umami/react-zen';
|
||||
import { Row, TextField } from '@umami/react-zen';
|
||||
|
||||
interface OtpInputProps {
|
||||
value: string;
|
||||
@@ -66,7 +66,7 @@ export function OtpInput({ value, onChange, onComplete, disabled }: OtpInputProp
|
||||
};
|
||||
|
||||
return (
|
||||
<Row gap='2'>
|
||||
<Row gap="2">
|
||||
{digits.map((digit, i) => (
|
||||
<div
|
||||
key={i}
|
||||
@@ -85,7 +85,7 @@ export function OtpInput({ value, onChange, onComplete, disabled }: OtpInputProp
|
||||
autoComplete="one-time-code"
|
||||
aria-label={`Digit ${i + 1}`}
|
||||
placeholder="0"
|
||||
style={{width: 32}}
|
||||
style={{ width: 32 }}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { useApi } from '../useApi';
|
||||
|
||||
export function useTwoFactorUserStatusQuery(userId: string) {
|
||||
const { get, useQuery } = useApi();
|
||||
const { get, useQuery } = useApi();
|
||||
|
||||
return useQuery({
|
||||
queryKey: ['user-2fa-status', userId],
|
||||
queryFn: () => get(`/admin/users/${userId}/2fa`),
|
||||
refetchOnWindowFocus: true,
|
||||
refetchOnReconnect: true,
|
||||
});
|
||||
return useQuery({
|
||||
queryKey: ['user-2fa-status', userId],
|
||||
queryFn: () => get(`/admin/users/${userId}/2fa`),
|
||||
refetchOnWindowFocus: true,
|
||||
refetchOnReconnect: true,
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user