Enhance API and frontend components for character management and map visibility
- Updated API documentation to include `ownedByMe` field in character responses, indicating if a character was last updated by the current user's tokens. - Modified MapView component to track and display the live status based on user-owned characters. - Enhanced map data handling to exclude hidden maps for non-admin users and improved character icon representation on the map. - Refactored character data structures to support new properties and ensure accurate rendering in the frontend.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"log/slog"
|
||||
@@ -26,7 +27,8 @@ func (h *Handlers) ClientRouter(rw http.ResponseWriter, req *http.Request) {
|
||||
rw.WriteHeader(http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
_ = username
|
||||
ctx = context.WithValue(ctx, app.ClientUsernameKey, username)
|
||||
req = req.WithContext(ctx)
|
||||
|
||||
switch matches[2] {
|
||||
case "locate":
|
||||
|
||||
Reference in New Issue
Block a user