mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-20 09:20:11 +00:00
DataStore is interface now. Liskov would be proud.
This commit is contained in:
@@ -7,11 +7,11 @@ import (
|
||||
)
|
||||
|
||||
func (h *Handlers) CosmiumExport(c *gin.Context) {
|
||||
repositoryState, err := h.repository.GetState()
|
||||
dataStoreState, err := h.dataStore.DumpToJson()
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
c.Data(http.StatusOK, "application/json", []byte(repositoryState))
|
||||
c.Data(http.StatusOK, "application/json", []byte(dataStoreState))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user