branch: master
commit 0f877a1c197e229d7b6797c6d01540d6743da756
Author: Danny Milosavljevic <dan...@scratchpost.org>
Date:   Mon Feb 19 22:22:03 2018 +0100

    http: Convert build-id URL part to number.
    
    * src/cuirass/http.scm (url-handler): Convert build-id URL part to number.
---
 src/cuirass/http.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
index 3856b1d..3f49369 100644
--- a/src/cuirass/http.scm
+++ b/src/cuirass/http.scm
@@ -140,12 +140,12 @@
     (((or "jobsets" "specifications") . rest)
      (respond-json (object->json-string (db-get-specifications db))))
     (("build" build-id)
-     (let ((hydra-build (handle-build-request db build-id)))
+     (let ((hydra-build (handle-build-request db (string->number build-id))))
        (if hydra-build
            (respond-json (object->json-string hydra-build))
            (respond-build-not-found build-id))))
     (("build" build-id "log" "raw")
-     (let ((build (db-get-build db build-id)))
+     (let ((build (db-get-build db (string->number build-id))))
        (if build
            (match (assq-ref build #:outputs)
              (((_ (#:path . (? string? output))) _ ...)

Reply via email to