mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 01:24:34 +08:00
25 lines
616 B
JavaScript
25 lines
616 B
JavaScript
(function() {
|
|
|
|
window.Discourse.VersionCheck = Discourse.Model.extend({
|
|
hasInstalledSha: function() {
|
|
console.log( 'hello??' );
|
|
return( this.get('installed_sha') && this.get('installed_sha') != 'unknown' );
|
|
}.property('installed_sha')
|
|
});
|
|
|
|
Discourse.VersionCheck.reopenClass({
|
|
find: function() {
|
|
var promise = new RSVP.Promise()
|
|
jQuery.ajax({
|
|
url: '/admin/version_check',
|
|
dataType: 'json',
|
|
success: function(json) {
|
|
promise.resolve(Discourse.VersionCheck.create(json));
|
|
}
|
|
});
|
|
return promise;
|
|
}
|
|
});
|
|
|
|
}).call(this);
|