diff --git a/gametable/server.go b/gametable/server.go
index da9a3e9..2fb907c 100644
--- a/gametable/server.go
+++ b/gametable/server.go
@@ -221,7 +221,7 @@ func (self *GameTableServer) writeToDB(tableMsg models.TableMessage) error {
}
}
- // map image change and token addition/removal require admin authorization
+ // map image change, aux message, and token addition/removal require admin authorization
if tableMsg.Auth != nil {
authorized, _ := self.udb.ValidateToken(*tableMsg.Auth)
if authorized {
@@ -231,6 +231,12 @@ func (self *GameTableServer) writeToDB(tableMsg models.TableMessage) error {
return err
}
}
+ if tableMsg.AuxMsg != nil {
+ err := self.dbAdapter.SetAuxMessage(key, *tableMsg.AuxMsg)
+ if err != nil {
+ return err
+ }
+ }
}
}
return nil
diff --git a/models/models.go b/models/models.go
index d9aa989..799fc6b 100644
--- a/models/models.go
+++ b/models/models.go
@@ -17,12 +17,13 @@ type DiceRoll struct {
Timestamp time.Time `json:"timestamp"`
}
+
type Token struct {
Id string `json:"id"`
Name string `json:"name"`
SpriteUri string `json:"spriteUrl"`
- X int `json:"x"`
- Y int `json:"y"`
+ X *int `json:"x"`
+ Y *int `json:"y"`
}
type Table struct {
diff --git a/static/admin.js b/static/admin.js
index de5df99..80d2059 100644
--- a/static/admin.js
+++ b/static/admin.js
@@ -23,9 +23,8 @@ async function getTable(name, pass) {
document.getElementById("input_table_name").value = name;
document.getElementById("input_table_pass").value = pass;
dial();
- infoHtml = "← table list
"; - infoHtml += await res.text(); - infoHtml += "" + infoHtml = "← table list