Skip to content

Commit

Permalink
test: remove callback from async hook
Browse files Browse the repository at this point in the history
  • Loading branch information
hassy committed Feb 28, 2024
1 parent a1fc2c5 commit 5a6ac0a
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ const AddressSchema = z.object({
country: z.string()
});

export const checkAddress = async (context, ee, next) => {
export const checkAddress = async (context, ee) => {
const address = context.vars.address;
const result = AddressSchema.safeParse(address);

if (!result.success) {
ee.emit('error', 'invalid_address');
}

next();
};

0 comments on commit 5a6ac0a

Please sign in to comment.