mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
Improve statistic
This commit is contained in:
@@ -113,10 +113,13 @@ func parseResourceIfPresent(line string, host string) *model.ResourceView {
|
||||
|
||||
func GetResource(id uint, host string) (*model.ResourceDetailView, error) {
|
||||
r, err := dao.GetResourceByID(id)
|
||||
_ = dao.AddResourceViewCount(id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = dao.AddResourceViewCount(id)
|
||||
if err != nil {
|
||||
log.Error("AddResourceViewCount error: ", err)
|
||||
}
|
||||
v := r.ToDetailView()
|
||||
if host != "" {
|
||||
related := findRelatedResources(r, host)
|
||||
|
Reference in New Issue
Block a user