guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

07/08: Add a JSON output for the revision channel instances


From: Christopher Baines
Subject: 07/08: Add a JSON output for the revision channel instances
Date: Fri, 24 Apr 2020 13:54:48 -0400 (EDT)

cbaines pushed a commit to branch master
in repository data-service.

commit f83cff7107e5aacba1cd8f0c971cd9c27451e720
Author: Christopher Baines <address@hidden>
AuthorDate: Fri Apr 24 10:46:20 2020 +0100

    Add a JSON output for the revision channel instances
---
 guix-data-service/web/revision/controller.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/guix-data-service/web/revision/controller.scm 
b/guix-data-service/web/revision/controller.scm
index 9f8592a..c48da0f 100644
--- a/guix-data-service/web/revision/controller.scm
+++ b/guix-data-service/web/revision/controller.scm
@@ -417,7 +417,14 @@
            mime-types)
       ((application/json)
        (render-json
-        '()))                           ; TODO
+        `((channel_instances . ,(list->vector
+                                 (map
+                                  (match-lambda
+                                    ((system derivation-file-name builds)
+                                     `((system     . ,system)
+                                       (derivation . ,derivation-file-name)
+                                       (builds     . ,(list->vector builds)))))
+                                  channel-instances))))))
       (else
        (render-html
         #:sxml (view-revision-channel-instances



reply via email to

[Prev in Thread] Current Thread [Next in Thread]