Fixed tag edit not rendering example posts
This commit is contained in:
parent
6209cc7833
commit
1e745fa648
1 changed files with 3 additions and 2 deletions
|
@ -19,6 +19,7 @@ App.Presenters.TagPresenter = function(
|
||||||
|
|
||||||
var tag;
|
var tag;
|
||||||
var tagName;
|
var tagName;
|
||||||
|
var posts;
|
||||||
|
|
||||||
var privileges = {};
|
var privileges = {};
|
||||||
|
|
||||||
|
@ -52,7 +53,7 @@ App.Presenters.TagPresenter = function(
|
||||||
api.get('posts', {query: tagName}))
|
api.get('posts', {query: tagName}))
|
||||||
.then(function(tagResponse, postsResponse) {
|
.then(function(tagResponse, postsResponse) {
|
||||||
tag = tagResponse.json;
|
tag = tagResponse.json;
|
||||||
var posts = postsResponse.json.data;
|
posts = postsResponse.json.data;
|
||||||
posts = posts.slice(0, 8);
|
posts = posts.slice(0, 8);
|
||||||
|
|
||||||
render();
|
render();
|
||||||
|
@ -84,7 +85,7 @@ App.Presenters.TagPresenter = function(
|
||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
tag = response.json;
|
tag = response.json;
|
||||||
render();
|
render();
|
||||||
router.navigate('#/tag/' + tag.name);
|
renderPosts(posts);
|
||||||
}).fail(function(response) {
|
}).fail(function(response) {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
window.alert('An error occurred');
|
window.alert('An error occurred');
|
||||||
|
|
Loading…
Reference in a new issue