Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.post('#/register', function (ctx) {
- let username = ctx.params.username
- let password = ctx.params.password
- let repeatPass = ctx.params.repeatPass
- console.log(username + ":" + repeatPass)
- if (username = '' || password == '') {
- alert('Username and password can not be empty!')
- ctx.redirect('#/index.html')
- return
- } else {
- if (password !== repeatPass) {
- alert('Passwords do not match')
- ctx.redirect('#/index.html')
- return
- } else {
- console.log(username + ": " + password)
- auth.register(ctx.username, password)
- ctx.redirect('#/index.html')
- }
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement