Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (13 sloc) 645 Bytes
;; --------------------------------------------------------
;; 4.4-rotate-keyset
;; --------------------------------------------------------
;; define a function rotate-keyset that takes the parameters id and new-keyset
(defun rotate-keyset (id new-keyset)
;; enforce user authorization to the provided id
(enforce-user-auth id)
;; update the keyset to the new-keyset for the id in the users table
(update users id { "keyset": new-keyset})
;; return a message describing the update in the format "Updated keyset for user [id]"
(format "Updated keyset for user {}"
[id])
)
You can’t perform that action at this time.