We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need to package this up so it's available when Sitefox + nbb are installed.
(ns set-user-password (:require [applied-science.js-interop :as j] [promesa.core :as p] [sitefox.auth :refer [hash-password save-user]] [sitefox.db :refer [f]])) (defn change-password [password email] (p/let [users (f "users" (fn [u] (= (j/get-in u [:auth :email]) email))) user (first users) [hashed-password salt] (hash-password password) user (when user (j/assoc! user :auth (clj->js {:email email :password hashed-password :salt salt})))] (if user (save-user user) (print "User not found.\n" "Usage: set-user-password EMAIL NEW-PASSWORD")))) (change-password (.pop js/process.argv) (.pop js/process.argv))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Need to package this up so it's available when Sitefox + nbb are installed.
The text was updated successfully, but these errors were encountered: