Log last activity date

This commit is contained in:
Flashfyre committed 2024-03-15 16:38:32 -04:00
1 parent 967cbeecdd
commit 23eb0bbbe8
2 files changed
+21

No files matched your search

+12
View File
@@ -6,10 +6,12 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"strconv"
"github.com/Flashfyre/pokerogue-server/db"
"github.com/klauspost/compress/zstd"
)
@@ -128,6 +130,11 @@ func (s *Server) HandleSavedataUpdate(w http.ResponseWriter, r *http.Request) {
return
}
err = db.UpdateAccountLastActivity(uuid)
if err != nil {
log.Print("failed to update account last activity")
}
hexUuid := hex.EncodeToString(uuid)
switch r.URL.Query().Get("datatype") {
@@ -237,6 +244,11 @@ func (s *Server) HandleSavedataDelete(w http.ResponseWriter, r *http.Request) {
return
}
err = db.UpdateAccountLastActivity(uuid)
if err != nil {
log.Print("failed to update account last activity")
}
hexUuid := hex.EncodeToString(uuid)
switch r.URL.Query().Get("datatype") {