swh: Fix API call for getting origin.

When using the archival linter, git origins already in the archive where
not recognized due to an API change and where repeatedly asked for archival.
This is fixed here.

* guix/swh.scm (lookup-origin): Fix API URI for getting origin.
(<origin>): Fix comment with API URI example.
This commit is contained in:
Björn Höfling 2019-12-15 22:00:56 +01:00
parent ef6856ea72
commit 356a79becc
No known key found for this signature in database
GPG Key ID: BF286CB6593E5FFD
1 changed files with 2 additions and 2 deletions

View File

@ -244,7 +244,7 @@ FALSE-IF-404? is true, return #f upon 404 responses."
docstring
(call (swh-url components ...) json->value)))))
;; <https://archive.softwareheritage.org/api/1/origin/git/url/https://github.com/guix-mirror/guix/>
;; <https://archive.softwareheritage.org/api/1/origin//https://github.com/guix-mirror/guix/get>
(define-json-mapping <origin> make-origin origin?
json->origin
(id origin-id)
@ -365,7 +365,7 @@ FALSE-IF-404? is true, return #f upon 404 responses."
(define-query (lookup-origin url)
"Return an origin for URL."
(path "/api/1/origin/git/url" url)
(path "/api/1/origin" url "get")
json->origin)
(define-query (lookup-content hash type)