Remove external reference

This commit is contained in:
Arnaud (Arhuman) ASSAD 2023-07-04 17:59:54 +02:00
parent a06573253d
commit 175f1088a9
1 changed files with 6 additions and 8 deletions

View File

@ -1,22 +1,20 @@
package web package web
import ( import (
"doolta.com/api/auth"
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
) )
func (s *Server) Routes() { func (s *Server) Routes() {
s.router.Get("/hello", func(c *fiber.Ctx) error { s.router.Get("/hello", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!") return c.SendString("Hello, World!")
}) })
s.router.Get("/login", adaptor.HTTPHandlerFunc(auth.LoginHandler))
/* /*
r.HandleFunc("/logout", auth.LogoutHandler).Methods("GET") s.router.Get("/login", adaptor.HTTPHandlerFunc(auth.LoginHandler))
r.HandleFunc("/login_check", auth.LoginCheckHandler).Methods("POST") r.HandleFunc("/logout", auth.LogoutHandler).Methods("GET")
r.HandleFunc("/signup", auth.SignupHandler).Methods("GET") r.HandleFunc("/login_check", auth.LoginCheckHandler).Methods("POST")
r.HandleFunc("/signup_check", auth.SignupCheckHandler).Methods("POST") r.HandleFunc("/signup", auth.SignupHandler).Methods("GET")
r.HandleFunc("/validate/{hash:.+}", auth.ValidateLinkHandler).Methods("GET") r.HandleFunc("/signup_check", auth.SignupCheckHandler).Methods("POST")
r.HandleFunc("/validate/{hash:.+}", auth.ValidateLinkHandler).Methods("GET")
*/ */
// http.HandlerFunc -> fiber.Handler // http.HandlerFunc -> fiber.Handler
//app.Get("/greet", adaptor.HTTPHandlerFunc(greet) //app.Get("/greet", adaptor.HTTPHandlerFunc(greet)