mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
17 lines
556 B
JavaScript
17 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 'Page not found';
|
|
}
|
|
|
|
return this.get('content.statusText') !== 'error' ? this.get('content.statusText') : 'Internal Server Error';
|
|
}),
|
|
stack: false
|
|
});
|
|
|
|
export default ErrorController;
|