GoWeb/routes/postRoutes.go

21 lines
451 B
Go
Raw Normal View History

package routes
import (
"GoWeb/app"
"GoWeb/controllers"
"GoWeb/middleware"
"net/http"
)
2022-11-04 20:12:57 +00:00
// PostRoutes defines all project post routes
func PostRoutes(app *app.App) {
2022-11-04 20:12:57 +00:00
// Post controller struct initialize
postController := controllers.PostController{
App: app,
}
2022-11-04 20:12:57 +00:00
// User authentication
2023-07-23 04:37:38 +00:00
http.HandleFunc("/register-handle", middleware.Csrf(postController.Register))
http.HandleFunc("/login-handle", middleware.Csrf(postController.Login))
}