eliminate redundant string allocs in ViewTopic

save bytes
This commit is contained in:
Azareal 2020-05-11 17:28:18 +10:00
parent 26270db429
commit e222b3970a
2 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@
console.log("resp",resp);
return;
}
resp.text().then(dat => eval(dat));
resp.text().then(d => eval(d));
})
.catch(e => console.log("e",e));
});

View File

@ -67,7 +67,8 @@ func ViewTopic(w http.ResponseWriter, r *http.Request, user *c.User, header *c.H
return c.NoPermissions(w, r, user)
}
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)
if err != nil {