/jsonp/package/modify-all -> /api/package/modify-all

This commit is contained in:
Tony Garnock-Jones 2016-08-02 21:08:23 -04:00
parent ce084c25d9
commit d38f1c1f16

View File

@ -1187,18 +1187,14 @@
(and (or (equal? old-name name) (and (or (equal? old-name name)
;; Don't let renames stomp on existing packages ;; Don't let renames stomp on existing packages
(not (package-detail (string->symbol name)))) (not (package-detail (string->symbol name))))
(jsonp-rpc! "/jsonp/package/modify-all" (eq? #t (simple-json-rpc! "/api/package/modify-all"
'() (hash 'pkg old-name
#:post-data 'name name
(string->bytes/utf-8 'description description
(jsexpr->string 'source source
(hash 'pkg old-name 'tags tags
'name name 'authors authors
'description description 'versions versions)))
'source source
'tags tags
'authors authors
'versions versions))))
(let* ((new-pkg (or old-pkg (hash))) (let* ((new-pkg (or old-pkg (hash)))
(new-pkg (hash-set new-pkg 'name name)) (new-pkg (hash-set new-pkg 'name name))
(new-pkg (hash-set new-pkg 'description description)) (new-pkg (hash-set new-pkg 'description description))