Skip to content

Commit

Permalink
LOL
Browse files Browse the repository at this point in the history
  • Loading branch information
borisghidaglia committed Jul 29, 2024
1 parent a20450a commit 6f56453
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/_actions/addUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { redirect } from "next/navigation";

export const addUser = async (
uuid: string,
prevState: any,
prevState: unknown,
formData: FormData,
) => {
// Basic check that username and location are valid
Expand All @@ -33,8 +33,11 @@ export const addUser = async (

const about = await getHnUserAboutSection(username);

const isUuidValid =
about !== undefined && (await isValidUuidInHnUserAbout(about, uuid));

// Checks account ownership
if (!about || !isValidUuidInHnUserAbout(about, uuid))
if (!about || !isUuidValid)
return {
success: false,
message: (
Expand Down

0 comments on commit 6f56453

Please sign in to comment.