fix: 调试发布run

This commit is contained in:
npc0-hue
2026-07-22 11:44:48 +08:00
parent b06623d0ce
commit 6c3eb6e45f
41 changed files with 1289 additions and 206 deletions
+8 -3
View File
@@ -1285,8 +1285,8 @@ func (h *coreHandlers) serverInstances(w http.ResponseWriter, r *http.Request) {
}
// serverInstanceDetail godoc
// @Summary Get, update, or archive server instance
// @Description Returns one server instance by ID, updates safe metadata, or archives it by marking the instance deleted after safety validation.
// @Summary Get, update, or delete server instance
// @Description Returns one server instance by ID, updates safe metadata, or deletes it by marking the instance deleted after safety validation and password confirmation. Delete requests send a JSON body with the current password.
// @Tags server-instances
// @Accept json
// @Produce json
@@ -1323,7 +1323,12 @@ func (h *coreHandlers) serverInstanceDetail(w http.ResponseWriter, r *http.Reque
}
writeJSON(w, http.StatusOK, dto.ServerInstanceFromDomain(instance))
case http.MethodDelete:
_, err := h.core.ArchiveServerInstanceForSession(bearerToken(r), r.PathValue("id"))
request, err := decodeJSON[dto.ServerDeletionRequest](r)
if err != nil {
writeDecodeError(w, err)
return
}
_, err = h.core.DeleteServerInstanceForSession(bearerToken(r), r.PathValue("id"), request.Password)
if err != nil {
writeServiceError(w, err)
return