add events

This commit is contained in:
andrusyakka
2023-07-17 14:30:22 +03:00
parent 9234b577bb
commit c8ce5a910e
5 changed files with 99 additions and 29 deletions

View File

@@ -4,6 +4,7 @@ import (
"astra-api-gateway/config"
"astra-api-gateway/handler"
"astra-api-gateway/mw"
"astra-api-gateway/services/events"
"astra-api-gateway/services/store"
"astra-api-gateway/services/users"
"github.com/joho/godotenv"
@@ -39,8 +40,14 @@ func main() {
e.GET("/users/:id", users.GetUsers)
e.DELETE("/users/:id", users.DeleteUser)
e.PATCH("/users/:id", users.UpdateUser)
e.GET("/users/organizations", users.GetOrganizations)
e.GET("/users/positions", users.GetPositions)
e.GET("/organizations", users.GetOrganizations)
//Events
e.GET("/events", events.GetEvents)
e.GET("/events/:id", events.GetEvent)
e.POST("/events", events.CreateEvent)
e.DELETE("/events", events.DeleteEvent)
// Store
store_g := e.Group("/store")