GoWeb/internal/routes/post.go

21 lines
453 B
Go
Raw Normal View History

package routes
import (
2024-07-10 22:45:04 +00:00
"GoWeb/internal"
"GoWeb/internal/controllers"
"GoWeb/internal/middleware"
"net/http"
)
// Post defines all project post routes
2024-07-02 02:19:48 +00:00
func Post(app *app.Deps) {
2022-11-04 20:12:57 +00:00
// Post controller struct initialize
postController := controllers.Post{
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))
}