Add session routes
This commit is contained in:
parent
2d270951d7
commit
76f1b1427f
|
@ -10,6 +10,7 @@ import (
|
|||
)
|
||||
|
||||
func main() {
|
||||
models.Store()
|
||||
models.Init()
|
||||
var user controllers.User
|
||||
r := chi.NewRouter()
|
||||
|
@ -17,5 +18,7 @@ func main() {
|
|||
r.Handle("/*", http.FileServer(http.Dir("/api/www")))
|
||||
r.Get("/user/{username}", user.Get)
|
||||
r.Post("/user/{username}", user.Create)
|
||||
r.Post("/login", controllers.Login)
|
||||
r.Post("/logout", controllers.Logout)
|
||||
http.ListenAndServe(":8080", r)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue