overleaf/services/web/public/coffee/track-changes/models/Change.coffee

12 lines
276 B
CoffeeScript
Raw Normal View History

define [
2014-03-07 06:24:11 -05:00
"models/User"
"libs/backbone"
2014-03-07 06:24:11 -05:00
], (User)->
Change = Backbone.Model.extend
parse: (change) ->
return {
start_ts: change.meta.start_ts
end_ts: change.meta.end_ts
2014-03-07 06:24:11 -05:00
user: User.findOrBuild(change.meta.user.id, change.meta.user)
2014-03-06 09:08:12 -05:00
version: change.v
}