photoprism/internal/api/status.go
Michael Mayer 3e4121cc78 Server: Add "restart required" flag and button to restart the server
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-03-27 19:27:19 +02:00

17 lines
292 B
Go

package api
import (
"net/http"
"github.com/gin-gonic/gin"
)
// GetStatus reports if the server is operational.
//
// GET /api/v1/status
func GetStatus(router *gin.RouterGroup) {
router.GET("/status", func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"status": "operational"})
})
}