                                              "  The CEO Team")
                                         email role institution-name timestamp)]
                   (send-mail [email] nil nil "User Role Changed!" email-msg "text/plain"))))))))
-    {:status  200
-     :headers {"Content-Type" "application/json"}
-     :body    (json/write-str (get-institution-by-id institution-id))}))
+    (data-response (get-institution-by-id institution-id))))
 
 (defn request-institution-membership [{:keys [params]}]
   (let [user-id        (Integer/parseInt (:userId params))
         institution-id (Integer/parseInt (:institutionId params))]
     (call-sql "add_institution_user" institution-id user-id 3)
-    {:status  200
-     :headers {"Content-Type" "application/json"}
-     :body    (json/write-str (get-institution-by-id institution-id))}))
+    (data-response (get-institution-by-id institution-id))))
 
 (defn submit-email-for-mailing-list [{:keys [params]}]
   (let [{:keys [subject body]} params

                              email)]
        (call-sql "set_mailing_list" (:user_id user) false)
        (send-mail [email] nil nil "Successfully unsubscribed from CEO mailing list" email-msg "text/plain")
        {:status  200
         :headers {"Content-Type" "application/json"}
         :body    ""})
      {:status  200
       :headers {"Content-Type" "application/json"}
       :body    "There is no user with that email address."})))

                                       "  %spassword-reset?email=%s&password-reset-key=%s")
                                  email (get-base-url) email reset-key)]
            (send-mail [email] nil nil "Password reset on CEO" email-msg "text/plain")
            (data-response ""))
          (data-response "Failed to create a reset key. Please try again later")))
      (data-response "There is no user with that email address."))))

(defn- get-reset-password-errors [password password-confirmation]
  (cond (< (count password) 8)
