auth rout
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package initializers
|
||||
|
||||
import (
|
||||
"api/src/auth"
|
||||
"api/src/storages/psql"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
@@ -68,6 +69,11 @@ func InitChiRouting() {
|
||||
w.Write([]byte("welcome developer! Cool."))
|
||||
})
|
||||
|
||||
r.Route("/auth", func(r chi.Router) {
|
||||
r.Post("/register", auth.Register)
|
||||
r.Post("/loging", auth.Login)
|
||||
})
|
||||
|
||||
// up server on os.Getenv("SERVER_PORT") port on gorutin
|
||||
go func() {
|
||||
defer close(Done)
|
||||
|
||||
Reference in New Issue
Block a user