Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

chore: `pnpm run format`

Rudy B.1068a82d0337
diff --git a/src/app/api/2fa/verify/route.ts b/src/app/api/2fa/verify/route.ts
index 22542410d..f7db0c8ff 100644
--- a/src/app/api/2fa/verify/route.ts
+++ b/src/app/api/2fa/verify/route.ts
@@ -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);
diff --git a/src/components/common/OtpInput.tsx b/src/components/common/OtpInput.tsx
index dfce36dc5..0081607b0 100644
--- a/src/components/common/OtpInput.tsx
+++ b/src/components/common/OtpInput.tsx
@@ -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>
))}
diff --git a/src/components/hooks/queries/useTwoFactorUserStatus.ts b/src/components/hooks/queries/useTwoFactorUserStatus.ts
index d1d73168a..96de5edfb 100644
--- a/src/components/hooks/queries/useTwoFactorUserStatus.ts
+++ b/src/components/hooks/queries/useTwoFactorUserStatus.ts
@@ -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,
+ });
}