Update account activity on rankings load

pull/1/head
Flashfyre 2024-03-24 19:00:04 -04:00
parent 7d23859dea
commit eb671f2cb7
1 changed files with 12 additions and 0 deletions

View File

@ -84,6 +84,18 @@ func (s *Server) HandleRankings(w http.ResponseWriter, r *http.Request) {
var category int
var page int
var uuid []byte
uuid, err = GetUuidFromRequest(r)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
err = db.UpdateAccountLastActivity(uuid)
if err != nil {
log.Print("failed to update account last activity")
}
if r.URL.Query().Has("category") {
category, err = strconv.Atoi(r.URL.Query().Get("category"))
if err != nil {