forked from MTSR/mapserver
api fixes and error log instead of panic
This commit is contained in:
parent
8cc9a67215
commit
f1ee971020
@ -71,7 +71,14 @@ func (a *MapBlockAccessor) FindMapBlocksByMtime(lastmtime int64, limit int, laye
|
||||
|
||||
mapblock, err := mapblockparser.Parse(block.Data, block.Mtime, block.Pos)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
fields := logrus.Fields{
|
||||
"x": block.Pos.X,
|
||||
"y": block.Pos.Y,
|
||||
"z": block.Pos.Z,
|
||||
"err": err,
|
||||
}
|
||||
logrus.WithFields(fields).Error("parse error")
|
||||
continue
|
||||
}
|
||||
|
||||
a.Eventbus.Emit(eventbus.MAPBLOCK_RENDERED, mapblock)
|
||||
|
@ -9,7 +9,7 @@ var api = {
|
||||
},
|
||||
|
||||
getConfig: function(){
|
||||
return m.request("/api/config");
|
||||
return m.request("api/config");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user