Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Session = Backbone.Model.extend({
- url: '/session'
- });
- var session = new Session();
- session.fetch(); // Get the user authentication of the backend server.
- var User = Backbone.Model.extend({
- url: '/user'
- });
- function signup(fullName, email, password){
- var user = new User();
- user.save({
- fullName: fullName,
- email: email,
- password: password
- });
- };
- function activate(id, activationId){
- var user = new User();
- user.save({
- id: id,
- activationId: activationId
- });
- };
- // Possibility...?
- function submitInterests(id, interests){
- var user = new User(url: '/user/interests/');
- user.save({
- id: id,
- activationid: activationId
- });
- }
- /users/:id/interests
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement