mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +03:00
1a9e91f120
closes #2277 - Added ES6 linting to core/client/ - Fix typeof array comparison
28 lines
552 B
JavaScript
28 lines
552 B
JavaScript
var ghostBookshelf = require('./base'),
|
|
|
|
Session,
|
|
Sessions;
|
|
|
|
Session = ghostBookshelf.Model.extend({
|
|
|
|
tableName: 'sessions'
|
|
|
|
}, {
|
|
destroyAll: function (options) {
|
|
options = options || {};
|
|
return ghostBookshelf.Collection.forge([], {model: this}).fetch()
|
|
.then(function (collection) {
|
|
collection.invokeThen('destroy', options);
|
|
});
|
|
}
|
|
});
|
|
|
|
Sessions = ghostBookshelf.Collection.extend({
|
|
model: Session
|
|
});
|
|
|
|
module.exports = {
|
|
Session: Session,
|
|
Sessions: Sessions
|
|
};
|