Skip to content

Commit 1949801

Browse files
committed
Fix lint errors
1 parent 6a4f6c6 commit 1949801

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/app/api/invites/route.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@ export async function POST(request: NextRequest) {
4242
}
4343

4444
const formData = await request.formData();
45-
let email, userType;
46-
const parsedData = schema.safeParse(formData);
47-
if (!parsedData.success) {
45+
const parseResult = schema.safeParse(formData);
46+
if (!parseResult.success) {
4847
return argumentError("Invalid form data");
4948
}
50-
email = parsedData.data.email;
51-
userType = parsedData.data.userType;
49+
const { email, userType } = parseResult.data;
5250

5351
const existingUser = await db.user.findFirst({ where: { email } });
5452
if (existingUser) {

0 commit comments

Comments
 (0)