Super secret view counting

This commit is contained in:
2019-02-11 22:41:22 +01:00
parent 95405e76d1
commit 32f715e65f
6 changed files with 8 additions and 9 deletions

View File

@@ -24,7 +24,7 @@ func (wc *WebController) serveFilePreview(w http.ResponseWriter, r *http.Request
return
}
var api = pixelapi.New(wc.conf.APIURLInternal, "")
inf, err := api.GetFileInfo(p.ByName("id")) // TODO: Error handling
inf, err := api.GetFileInfo(p.ByName("id"), "?should_a_view_be_added=yes_gimme") // TODO: Error handling
if err != nil {
wc.serveNotFound(w, r)
return

View File

@@ -30,7 +30,7 @@ func (wc *WebController) serveFileViewer(w http.ResponseWriter, r *http.Request,
var api = pixelapi.New(wc.conf.APIURLInternal, "")
var finfo []*pixelapi.FileInfo
for _, id := range ids {
inf, err := api.GetFileInfo(id)
inf, err := api.GetFileInfo(id, "")
if err != nil {
continue
}