Skip to content

Commit

Permalink
Adds user-pool attribute helper
Browse files Browse the repository at this point in the history
  • Loading branch information
dehli committed Feb 20, 2020
1 parent d145ac5 commit 71f36e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>dehli</groupId>
<artifactId>serverless</artifactId>
<version>0.1.35</version>
<version>0.1.36</version>
<name>serverless</name>

<dependencies>
Expand Down
7 changes: 5 additions & 2 deletions src/serverless/aws/user_pools.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
(defonce ^:private CognitoIdentityServiceProvider
(gobj/get AWS "CognitoIdentityServiceProvider"))

(defonce ^:private service-provider ^:private
(CognitoIdentityServiceProvider.))
(defonce ^:private service-provider
(new CognitoIdentityServiceProvider))

(defonce admin-create-user
(partial js-call service-provider "adminCreateUser"))
Expand All @@ -19,3 +19,6 @@

(defonce list-users
(partial js-call service-provider "listUsers"))

(defn attribute [{attributes :UserAttributes} attribute]
(->> attributes (filter #(= (:Name %) attribute)) first :Value))

0 comments on commit 71f36e1

Please sign in to comment.