overleaf/services/web/public/coffee/track-changes/models/Change.coffee
2014-03-07 11:24:11 +00:00

12 lines
No EOL
276 B
CoffeeScript

define [
"models/User"
"libs/backbone"
], (User)->
Change = Backbone.Model.extend
parse: (change) ->
return {
start_ts: change.meta.start_ts
end_ts: change.meta.end_ts
user: User.findOrBuild(change.meta.user.id, change.meta.user)
version: change.v
}