mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-19 17:00:37 +00:00
Move out repository models; Hidrate collection on create
This commit is contained in:
@@ -3,11 +3,14 @@ package api
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/pikami/cosmium/api/handlers"
|
||||
"github.com/pikami/cosmium/api/handlers/middleware"
|
||||
)
|
||||
|
||||
func CreateRouter() *gin.Engine {
|
||||
router := gin.Default()
|
||||
|
||||
router.Use(middleware.RequestLogger())
|
||||
|
||||
router.GET("/dbs/:databaseId/colls/:collId/pkranges", handlers.GetPartitionKeyRanges)
|
||||
|
||||
router.POST("/dbs/:databaseId/colls/:collId/docs", handlers.DocumentsPost)
|
||||
|
||||
Reference in New Issue
Block a user