1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/controllers/error.js
2015-03-11 12:37:41 -06:00

16 lines
556 B
JavaScript

import Ember from 'ember';
var ErrorController = Ember.Controller.extend({
code: Ember.computed('content.status', function () {
return this.get('content.status') > 200 ? this.get('content.status') : 500;
}),
message: Ember.computed('content.statusText', function () {
if (this.get('code') === 404) {
return 'No Ghost Found';
}
return this.get('content.statusText') !== 'error' ? this.get('content.statusText') : 'Internal Server Error';
}),
stack: false
});
export default ErrorController;