This is an automated email from the git hooks/post-receive script. New commit to branch bow-v2-go in repository bow. See https://gitlab.nuiton.org/chorem/bow.git commit f33b9d8e16898a371b01034796c5617ea9a488ac Author: Benjamin <poussin@codelutin.com> Date: Tue Jan 26 01:27:18 2021 +0100 correction si le nombre de visite est null, on incremente tout de meme --- pkg/repository/bookmarkRepository.go | 2 +- web/src/views/PageHistory.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/repository/bookmarkRepository.go b/pkg/repository/bookmarkRepository.go index 29c7de6..d11e1b5 100644 --- a/pkg/repository/bookmarkRepository.go +++ b/pkg/repository/bookmarkRepository.go @@ -217,7 +217,7 @@ func URIFromAlias(currentUser model.BowUser, alias string) (string, error) { // AddOneVisit ajout 1 au compteur de visite func AddOneVisit(currentUser model.BowUser, id string) (string, error) { - q := &query{sql: `update bookmark SET visit = visit + 1 where id=$1 returning uri;`} + q := &query{sql: `update bookmark SET visit = coalesce(visit, 0) + 1 where id=$1 returning uri;`} uri, err := q.QueryString(currentUser, id) if err != nil { return "", utils.NewHTTPError500(err, currentUser) diff --git a/web/src/views/PageHistory.vue b/web/src/views/PageHistory.vue index 4d58dba..b98b59d 100644 --- a/web/src/views/PageHistory.vue +++ b/web/src/views/PageHistory.vue @@ -1,6 +1,6 @@ <template> <div class="page-history"> - <div><a href="">{{ history.first }}</a> <a href="">{{ history.prev }}</a> <a href="">{{ history.next }}</a> <a href="">{{ history.last }}</a></div> + <div>first: <a href="">{{ history.first }}</a> prev: <a href="">{{ history.prev }}</a> next: <a href="">{{ history.next }}</a> last: <a href="">{{ history.last }}</a></div> <div> <BookmarkDate :creationDate="history.creationdate"></BookmarkDate> <LinkCount -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.