chore: build
This commit is contained in:
@@ -71,6 +71,22 @@ func (h *Handler) List(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{"items": items})
|
||||
}
|
||||
|
||||
// Details : GET /projects/:id/details — état live des pods du projet, même
|
||||
// format que POST /demos/details (le panneau du back-office est commun).
|
||||
// Le namespace vient de la base, jamais de la requête.
|
||||
func (h *Handler) Details(c *gin.Context) {
|
||||
p, state, err := h.svc.State(c.Request.Context(), c.Param("id"))
|
||||
if err != nil {
|
||||
if errors.Is(err, ErrNotFound) {
|
||||
h.writeError(c, err)
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "impossible de récupérer l'état des ressources"})
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, gin.H{"namespace": p.Namespace, "state": state})
|
||||
}
|
||||
|
||||
// Get : GET /projects/:id.
|
||||
func (h *Handler) Get(c *gin.Context) {
|
||||
p, err := h.svc.Get(c.Param("id"))
|
||||
|
||||
Reference in New Issue
Block a user