Skip to content

Commit

Permalink
Fix text
Browse files Browse the repository at this point in the history
  • Loading branch information
jadeydi committed Jun 20, 2019
1 parent fbd4216 commit 6fcca0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions routes/user.go
Expand Up @@ -30,7 +30,7 @@ func registerUsers(router *httptreemux.TreeMux) {
router.GET("/me", impl.me)
router.GET("/subscribers", impl.subscribers)
router.GET("/users/:id", impl.show)
router.GET("/statistics", impl.statistics)
router.GET("/amount", impl.amount)
}

func (impl *usersImpl) authenticate(w http.ResponseWriter, r *http.Request, params map[string]string) {
Expand Down Expand Up @@ -118,7 +118,7 @@ func (impl *usersImpl) show(w http.ResponseWriter, r *http.Request, params map[s
}
}

func (impl *usersImpl) statistics(w http.ResponseWriter, r *http.Request, _ map[string]string) {
func (impl *usersImpl) amount(w http.ResponseWriter, r *http.Request, _ map[string]string) {
if s, err := models.ReadStatistic(r.Context(), middlewares.CurrentUser(r)); err != nil {
views.RenderErrorResponse(w, r, err)
} else {
Expand Down
2 changes: 1 addition & 1 deletion web/src/api/website.js
Expand Up @@ -4,7 +4,7 @@ function Website(api) {

Website.prototype = {
statistics: function (callback) {
this.api.request('GET', '/statistics', undefined, function(resp) {
this.api.request('GET', '/amount', undefined, function(resp) {
return callback(resp);
});
}
Expand Down

0 comments on commit 6fcca0b

Please sign in to comment.