Changeset 0.28.2.2 (#185)
This commit is contained in:
@@ -126,7 +126,7 @@ func (h *WorkspaceHandler) List(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, all)
|
||||
c.JSON(http.StatusOK, gin.H{"data": all})
|
||||
}
|
||||
|
||||
func (h *WorkspaceHandler) Update(c *gin.Context) {
|
||||
@@ -146,7 +146,13 @@ func (h *WorkspaceHandler) Update(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{"ok": true})
|
||||
// Re-fetch to return the updated object
|
||||
updated, err := h.stores.Workspaces.GetByID(c.Request.Context(), w.ID)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "failed to reload workspace"})
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, updated)
|
||||
}
|
||||
|
||||
func (h *WorkspaceHandler) Delete(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user