summaryrefslogtreecommitdiffstats
path: root/webapp/actions/user_actions.jsx
diff options
context:
space:
mode:
authorCarlos Tadeu Panato Junior <ctadeu@gmail.com>2017-01-24 09:45:52 +0100
committerGeorge Goldberg <george@gberg.me>2017-01-24 08:45:52 +0000
commit1e5354cff3adc49de8a7c4ace5905b1ef914bda2 (patch)
treeba76b5bbe5c8a55dd525fac5c45bdbdb7678d070 /webapp/actions/user_actions.jsx
parent58b3c76c94499e77194d814ebd63ad1e6f3a2d9e (diff)
downloadchat-1e5354cff3adc49de8a7c4ace5905b1ef914bda2.tar.gz
chat-1e5354cff3adc49de8a7c4ace5905b1ef914bda2.tar.bz2
chat-1e5354cff3adc49de8a7c4ace5905b1ef914bda2.zip
Move instances of Client.verifyEmail() in components to an action (#5166)
Diffstat (limited to 'webapp/actions/user_actions.jsx')
-rw-r--r--webapp/actions/user_actions.jsx17
1 files changed, 17 insertions, 0 deletions
diff --git a/webapp/actions/user_actions.jsx b/webapp/actions/user_actions.jsx
index 94546cf36..201a648f9 100644
--- a/webapp/actions/user_actions.jsx
+++ b/webapp/actions/user_actions.jsx
@@ -561,3 +561,20 @@ export function updatePassword(userId, currentPassword, newPassword, success, er
}
);
}
+
+export function verifyEmail(uid, hid, success, error) {
+ Client.verifyEmail(
+ uid,
+ hid,
+ (data) => {
+ if (success) {
+ success(data);
+ }
+ },
+ (err) => {
+ if (error) {
+ error(err);
+ }
+ }
+ );
+}