vibes
This commit is contained in:
@@ -129,6 +129,7 @@ func (s *Server) putSlot(w http.ResponseWriter, r *http.Request, p store.Player)
|
||||
fail(w, err)
|
||||
return
|
||||
}
|
||||
s.audit(r, p.ID, "code_save", 0, n, map[string]any{"name": req.Name, "bytes": len(req.Source), "sha256": sha256Hex([]byte(req.Source))})
|
||||
writeJSON(w, http.StatusOK, slotView{Slot: n, Name: req.Name})
|
||||
}
|
||||
|
||||
@@ -146,6 +147,7 @@ func (s *Server) deleteSlot(w http.ResponseWriter, r *http.Request, p store.Play
|
||||
fail(w, err)
|
||||
return
|
||||
}
|
||||
s.audit(r, p.ID, "code_clear", 0, n, nil)
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
}
|
||||
|
||||
@@ -173,5 +175,6 @@ func (s *Server) launchFromSlot(w http.ResponseWriter, r *http.Request, p store.
|
||||
fail(w, err)
|
||||
return
|
||||
}
|
||||
s.audit(r, p.ID, "launch", ship, n, map[string]any{"slot_name": sl.Name, "program_bytes": len(prog), "program_sha256": sha256Hex(prog)})
|
||||
writeJSON(w, http.StatusAccepted, map[string]any{"slot": n, "program_bytes": len(prog)})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user