mirror of
https://github.com/pikami/cosmium.git
synced 2025-02-03 06:27:59 +00:00
18 lines
341 B
Go
18 lines
341 B
Go
package handlers
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func (h *Handlers) CosmiumExport(c *gin.Context) {
|
|
repositoryState, err := h.repository.GetState()
|
|
if err != nil {
|
|
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
|
return
|
|
}
|
|
|
|
c.Data(http.StatusOK, "application/json", []byte(repositoryState))
|
|
}
|