cosmium/api/handlers/cosmium.go

18 lines
341 B
Go
Raw Permalink Normal View History

2024-02-23 00:27:12 +02:00
package handlers
import (
"net/http"
"github.com/gin-gonic/gin"
)
func (h *Handlers) CosmiumExport(c *gin.Context) {
repositoryState, err := h.repository.GetState()
2024-12-08 17:54:58 +02:00
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
c.Data(http.StatusOK, "application/json", []byte(repositoryState))
2024-02-23 00:27:12 +02:00
}