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:
Marc Di Luzio 2020-06-10 18:48:56 +01:00
parent 6fb7ee598d
commit b3b369f608
6 changed files with 4 additions and 147 deletions

View file

@ -31,7 +31,6 @@ func Test_InnerMain(t *testing.T) {
assert.Error(t, InnerMain("register"))
// These methods should fail without an account
assert.Error(t, InnerMain("spawn"))
assert.Error(t, InnerMain("move"))
assert.Error(t, InnerMain("radar"))
assert.Error(t, InnerMain("rover"))
@ -42,14 +41,6 @@ func Test_InnerMain(t *testing.T) {
// Perform the register
assert.NoError(t, InnerMain("register"))
// We've not spawned a rover yet so these should fail
assert.Error(t, InnerMain("move"))
assert.Error(t, InnerMain("radar"))
assert.Error(t, InnerMain("rover"))
// Spawn a rover
assert.NoError(t, InnerMain("spawn"))
// These should now work
assert.NoError(t, InnerMain("radar"))
assert.NoError(t, InnerMain("rover"))