Log last activity date
This commit is contained in:
1 parent
967cbeecdd
commit
23eb0bbbe8
2 files changed
+21
No files matched your search
@@ -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") {
|
||||
|
||||
Reference in new issue
Block a user