mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
fb6c3c6b56
Closes #3417
16 lines
529 B
JavaScript
16 lines
529 B
JavaScript
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;
|