How can I make Alamofire(swift-ios) and Deployd accept third parameter (property) i.e., an email? It's working fine but I need to add an email textfield too.
Swift code:
let user = "root"
let password = "root"
//let email = "root@root.com" (the third parameter)
let credential = NSURLCredential(user: user, password: password, persistence: .ForSession)
let parameters = ["username" : user, "password" : password]
Alamofire.request(.POST, "http://localhost:2403/users", parameters: parameters)
.authenticate(usingCredential: credential)
.response { request, response, _, error in }
from deployd's docs:
//Create a user
dpd.users.post({
username: "jeffbcross",
password: "secret"
}, onCreateUser);
Add custom properties and roles to your users, and write custom Event scripts to control access to users of your app.
I really have no idea about how can I write a custom Event script. I don't really know any language other than Swift. I've already created 'email' property at users from dashboard but it's not taken into effect.