Skip to content

Instantly share code, notes, and snippets.

@meeDamian
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meeDamian/9575340 to your computer and use it in GitHub Desktop.
Save meeDamian/9575340 to your computer and use it in GitHub Desktop.
app.service 'Session', ->
@create: (@sessionId, @userId) ->
@destroy: ->
@id = @userId = null
@
app.service('Session', function () {
this.create = function (sessionId, userId) {
this.id = sessionId;
this.userId = userId;
};
this.destroy = function () {
this.id = null;
this.userId = null;
};
return this;
})
app.service('Session', function() {
this.create = function(sessionId, userId) {
this.sessionId = sessionId;
this.userId = userId;
};
this.destroy = function() {
return this.id = this.userId = null;
};
return this;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment