eliminate redundant string allocs in ViewTopic
save bytes
This commit is contained in:
parent
26270db429
commit
e222b3970a
|
@ -7,7 +7,7 @@
|
||||||
console.log("resp",resp);
|
console.log("resp",resp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
resp.text().then(dat => eval(dat));
|
resp.text().then(d => eval(d));
|
||||||
})
|
})
|
||||||
.catch(e => console.log("e",e));
|
.catch(e => console.log("e",e));
|
||||||
});
|
});
|
||||||
|
|
|
@ -67,7 +67,8 @@ func ViewTopic(w http.ResponseWriter, r *http.Request, user *c.User, header *c.H
|
||||||
return c.NoPermissions(w, r, user)
|
return c.NoPermissions(w, r, user)
|
||||||
}
|
}
|
||||||
header.Title = topic.Title
|
header.Title = topic.Title
|
||||||
header.Path = c.BuildTopicURL(c.NameToSlug(topic.Title), topic.ID)
|
header.Path = topic.Link
|
||||||
|
//header.Path = c.BuildTopicURL(c.NameToSlug(topic.Title), topic.ID)
|
||||||
|
|
||||||
postGroup, err := c.Groups.Get(topic.Group)
|
postGroup, err := c.Groups.Get(topic.Group)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue