Skip to content

Commit 7e63aad

Browse files
getter used on models and 204 is now response on no preview not 404
1 parent 182add1 commit 7e63aad

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

frontend/src/modules/editor/selectTheme/views/editorThemeItemView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ define(function(require){
2424
},
2525

2626
postRender: function() {
27-
var previewUrl = '/api/theme/preview/' + this.model.attributes.name + '/' + this.model.attributes.version;
27+
var previewUrl = '/api/theme/preview/' + this.model.get('name') + '/' + this.model.get('name')
2828
var $previewLoc = this.$('.theme-preview');
2929

3030
$.ajax(previewUrl, {

plugins/content/theme/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ function initialize () {
148148
}
149149
],function(err, img) {
150150
if(err){
151-
res.sendStatus(404);
151+
res.sendStatus(204);
152152
return res;
153153
}
154154
res.writeHead(200, {'Content-Type': 'image/jpg' });

0 commit comments

Comments
 (0)