Skip to content

Commit

Permalink
Adds factory changes for api gw (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
onlinejudge95 committed May 14, 2024
1 parent c8bc6d5 commit 4641d37
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions internal/app/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ func AppFactory() *fiber.App {
service = *NewService(appLocalConfig)

app := fiber.New(fiberConfig)
app.Use(cors.New())

app.Use(cors.New())
app.Use(logger.New())

app.Post("/contact-us", ContactUsHandler)
app.Post("/welcome", WelcomeHandler)
app.Post("/password-reset", PasswordResetHandler)
api := app.Group("/api")
mailer := api.Group("/mailer")

mailer.Post("/contact-us", ContactUsHandler)
mailer.Post("/welcome", WelcomeHandler)
mailer.Post("/password-reset", PasswordResetHandler)

return app
}

0 comments on commit 4641d37

Please sign in to comment.