image acces api : GWM

This commit is contained in:
Gowtham M 2025-08-29 11:56:01 +05:30
parent 0ffa3c59fd
commit 684e3af3ef

View File

@ -2222,7 +2222,11 @@ func main() {
// Serve static files from the provided public directory (if exists)
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
e.Router.GET("/verify-email", verifyEmailHandler)
// e.Router.GET("/verify-email", verifyEmailHandler)
e.Router.GET("/verify-email", func(c echo.Context) error {
return verifyEmailHandler(c, baseUrl)
})
e.Router.GET("/*", apis.StaticDirectoryHandler(os.DirFS("./pb_public"), false))
return nil
})
@ -2501,7 +2505,7 @@ func generateOTP() (int, error) {
}
// Email verification handler
func verifyEmailHandler(c echo.Context) error {
func verifyEmailHandler(c echo.Context, baseUrl string) error {
log.Println("Starting verifyEmailHandler")
// Get the userId from the query parameter