[ci skip] more suggested improvements

This commit is contained in:
2026-02-06 15:35:18 +11:00
parent dfbaacb6f3
commit 0e3cf5aae9
24 changed files with 452 additions and 356 deletions

View File

@@ -57,9 +57,7 @@ func (h *Handler) EncryptData(w http.ResponseWriter, r *http.Request) {
}
h.Logger.Debug("encrypted plaintext payload", "input_length", len(plaintext))
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
_ = json.NewEncoder(w).Encode(map[string]string{
writeJSON(w, http.StatusOK, map[string]string{
"status": "OK",
"message": cipherText,
"prefixed": encryptedValuePrefixV1 + cipherText,