Skip to content

Commit

Permalink
change local call placement
Browse files Browse the repository at this point in the history
  • Loading branch information
willpinha committed May 14, 2024
1 parent e8a5918 commit de39c1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controllers/hello.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { validate } from "@/utils/validation";
import { getHelloMessage } from "@/services/hello.service";

const controller: RequestHandler = async (req, res) => {
const { foo } = res.locals;

const { receiver, customPrefix } = await validate(
req.body,
z.object({
Expand All @@ -17,6 +15,8 @@ const controller: RequestHandler = async (req, res) => {
})
);

const { foo } = res.locals;

const msg = getHelloMessage(foo, receiver, customPrefix);

res.status(200).json(JSend.success(msg));
Expand Down

0 comments on commit de39c1b

Please sign in to comment.