diff options
author | Aki <please@ignore.pl> | 2021-04-24 00:21:59 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2021-04-24 00:21:59 +0200 |
commit | 1cd08ba77e97014085e7f92f9ba589039b441b5a (patch) | |
tree | 3efee64f01a70f816e6917f179f3fd72b210dfb4 /derelict.go | |
parent | 43ff562b9432e47e7a766ce3b29e51212b01d7bd (diff) | |
download | field-1cd08ba77e97014085e7f92f9ba589039b441b5a.zip field-1cd08ba77e97014085e7f92f9ba589039b441b5a.tar.gz field-1cd08ba77e97014085e7f92f9ba589039b441b5a.tar.bz2 |
Exported models to another file
Diffstat (limited to 'derelict.go')
-rw-r--r-- | derelict.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/derelict.go b/derelict.go index d70598e..ef0b6c3 100644 --- a/derelict.go +++ b/derelict.go @@ -74,12 +74,7 @@ func handleBattlesPost(w http.ResponseWriter, r *http.Request) { http.Error(w, "Unexpected error 1", http.StatusInternalServerError) return } - type wreck struct { - Team int `json:"team"` - Id string `json:"id"` - Hash string `json:"hash"` - } - var wrecks []wreck + var wrecks []Wreck data, err := ioutil.ReadAll(r.Body) if err != nil { http.Error(w, "Unexpected error 2", http.StatusInternalServerError) |