mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-19 17:00:37 +00:00
Databases CRUD
This commit is contained in:
18
api/router.go
Normal file
18
api/router.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/pikami/cosmium/api/handlers"
|
||||
)
|
||||
|
||||
func CreateRouter() *gin.Engine {
|
||||
router := gin.Default()
|
||||
|
||||
router.GET("/dbs/:id", handlers.GetDatabase)
|
||||
router.DELETE("/dbs/:id", handlers.DeleteDatabase)
|
||||
router.GET("/dbs", handlers.GetAllDatabases)
|
||||
router.POST("/dbs", handlers.CreateDatabase)
|
||||
router.GET("/", handlers.GetServerInfo)
|
||||
|
||||
return router
|
||||
}
|
||||
Reference in New Issue
Block a user