Remove /spawn POST endpoint
This was increasing complexity for no added benefit /register now performs the spawn in 4 lines of code
This commit is contained in:
parent
6fb7ee598d
commit
b3b369f608
6 changed files with 4 additions and 147 deletions
|
@ -46,30 +46,6 @@ type RegisterResponse struct {
|
|||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
// ==============================
|
||||
// API: /{account}/spawn method: POST
|
||||
|
||||
// Spawn spawns the rover for an account
|
||||
// Responds with the position of said rover
|
||||
func (s Server) Spawn(account string, d SpawnData) (r SpawnResponse, err error) {
|
||||
err = s.Post(path.Join(account, "spawn"), d, &r)
|
||||
return
|
||||
}
|
||||
|
||||
// SpawnData is the data to be sent for the spawn command
|
||||
type SpawnData struct {
|
||||
// Empty for now, reserved for data
|
||||
}
|
||||
|
||||
// SpawnResponse is the data to respond with on a spawn command
|
||||
type SpawnResponse struct {
|
||||
Success bool `json:"success"`
|
||||
Error string `json:"error,omitempty"`
|
||||
|
||||
// The attributes of the spawned entity
|
||||
Attributes game.RoverAttributes `json:"attributes"`
|
||||
}
|
||||
|
||||
// ==============================
|
||||
// API: /{account}/command method: POST
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue