Patch
All checks were successful
release-tag / release-image (push) Successful in 1m52s

This commit is contained in:
jbergner
2025-04-29 16:05:17 +02:00
parent 2b9c843f0d
commit f5d3c975be

View File

@@ -126,6 +126,7 @@ CREATE TABLE IF NOT EXISTS orders (
payload JSON NOT NULL,
status VARCHAR(20) NOT NULL,
finalize_url VARCHAR(255) NOT NULL,
cert_url VARCHAR(255) NOT NULL,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS certs (
@@ -646,6 +647,7 @@ func (s *server) handleGetOrder(ctx context.Context, w http.ResponseWriter, r *h
if err := s.db.db.QueryRowContext(ctx,
`SELECT payload,status,finalize_url,cert_url FROM orders WHERE id=?`, id).
Scan(&raw, &status, &finalize, &certURL); err != nil {
lg.Error("handleGetOrder", err.Error(), "")
http.Error(w, "order", http.StatusNotFound)
return
}
@@ -660,9 +662,9 @@ func (s *server) handleGetOrder(ctx context.Context, w http.ResponseWriter, r *h
}
if certURL.Valid {
resp.CertURL = certURL.String
lg.Info("handleGetOrder", "Step1", "")
//lg.Info("handleGetOrder", "Step1", "")
}
lg.Info("handleGetOrder", "Step2", "")
//lg.Info("handleGetOrder", "Step2", "")
s.jsonResponse(w, http.StatusOK, resp, "")
}