Update project structure and enhance frontend functionality
- Added a new AGENTS.md file to document the project structure and conventions. - Updated .gitignore to include node_modules and refined cursor rules. - Introduced new backend and frontend components for improved map interactions, including context menus and controls. - Enhanced API composables for better admin and authentication functionalities. - Refactored existing components for cleaner code and improved user experience. - Updated README.md to clarify production asset serving and user setup instructions.
This commit is contained in:
@@ -6,10 +6,11 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/andyleap/hnh-map/internal/app/store"
|
||||
"go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
func (a *App) wipeTile(rw http.ResponseWriter, req *http.Request) {
|
||||
func (a *App) WipeTile(rw http.ResponseWriter, req *http.Request) {
|
||||
if a.requireAdmin(rw, req) == nil {
|
||||
return
|
||||
}
|
||||
@@ -37,7 +38,7 @@ func (a *App) wipeTile(rw http.ResponseWriter, req *http.Request) {
|
||||
}
|
||||
|
||||
a.db.Update(func(tx *bbolt.Tx) error {
|
||||
grids := tx.Bucket([]byte("grids"))
|
||||
grids := tx.Bucket(store.BucketGrids)
|
||||
if grids == nil {
|
||||
return nil
|
||||
}
|
||||
@@ -71,7 +72,7 @@ func (a *App) wipeTile(rw http.ResponseWriter, req *http.Request) {
|
||||
rw.WriteHeader(200)
|
||||
}
|
||||
|
||||
func (a *App) setCoords(rw http.ResponseWriter, req *http.Request) {
|
||||
func (a *App) SetCoords(rw http.ResponseWriter, req *http.Request) {
|
||||
if a.requireAdmin(rw, req) == nil {
|
||||
return
|
||||
}
|
||||
@@ -121,11 +122,11 @@ func (a *App) setCoords(rw http.ResponseWriter, req *http.Request) {
|
||||
}
|
||||
tds := []*TileData{}
|
||||
a.db.Update(func(tx *bbolt.Tx) error {
|
||||
grids := tx.Bucket([]byte("grids"))
|
||||
grids := tx.Bucket(store.BucketGrids)
|
||||
if grids == nil {
|
||||
return nil
|
||||
}
|
||||
tiles := tx.Bucket([]byte("tiles"))
|
||||
tiles := tx.Bucket(store.BucketTiles)
|
||||
if tiles == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user