1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-06-30 17:02:15 +00:00
seahub/static/scripts/app/collections/file-comments.js
2017-09-26 10:35:16 +08:00

25 lines
498 B
JavaScript

define([
'underscore',
'backbone',
'common'
], function(_, Backbone, Common) {
'use strict';
var collection = Backbone.Collection.extend({
url: function() {
return Common.getUrl({name: 'file-comments', repo_id: this.repo_id});
},
parse: function(data) {
return data.comments; // return the array
},
setData: function(repo_id) {
this.repo_id = repo_id;
}
});
return collection;
});