Add session routes

This commit is contained in:
jimmy 2022-09-11 01:21:20 +12:00
parent 2d270951d7
commit 76f1b1427f
1 changed files with 3 additions and 0 deletions

View File

@ -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)
}