feat: make watchdog itself configurable
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"eden-server/internal/database"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"orbits-server/internal/database"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gorm.io/gorm"
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
func spawnApiRoutes(api *gin.RouterGroup /* env runtime.Environment,*/, db *gorm.DB) {
|
||||
// prefix: api
|
||||
// Display the information on what is going on at the moment
|
||||
api.GET("/status", func(c *gin.Context) {
|
||||
api.GET("/command", func(c *gin.Context) {
|
||||
state, err := database.GetState(db)
|
||||
if err != nil {
|
||||
slog.Error("unable to determine state", "error", err)
|
||||
@@ -28,6 +28,10 @@ func spawnApiRoutes(api *gin.RouterGroup /* env runtime.Environment,*/, db *gorm
|
||||
})
|
||||
})
|
||||
|
||||
api.PATCH("/command", func(c *gin.Context) {
|
||||
|
||||
})
|
||||
|
||||
// define a route to check what is registered
|
||||
api.GET("/available", func(c *gin.Context) {
|
||||
files, err := database.GetFiles(db)
|
||||
|
||||
Reference in New Issue
Block a user