Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix new users login for issue #6

  • Loading branch information...
commit ef15d3b6f1cc8677391fb55b0b6780a0334d6d6f 1 parent 88068af
@gigasquid authored
Showing with 4 additions and 2 deletions.
  1. +1 −1  resources/public/js/refheap.js
  2. +3 −1 src/refheap/views/login.clj
View
2  resources/public/js/refheap.js
@@ -13,9 +13,9 @@ $(document).ready(function(){
dataType: "json",
success: function(data) {
if (data) {
- console.log("Hi there" + data);
$("#useri").html(data["login-html"]);
$("#language").after(data["private-html"])
+ $("body").html(data["chooselogin-html"])
}
},
});
View
4 src/refheap/views/login.clj
@@ -41,4 +41,6 @@
(if-let [username (login/user-exists email)]
(json {:login-html (html (logged-in username))
:private-html (html (private-checkbox {:private false}))})
- (create-user-page))))
+ (do
+ (session/flash-put! :email email)
+ (json {:chooselogin-html (html (create-user-page email))})))))

0 comments on commit ef15d3b

Please sign in to comment.
Something went wrong with that request. Please try again.