Simplify logic when creating a new installer; no longer requires an entire server object be passed.

This commit is contained in:
Dane Everitt
2021-08-29 14:08:01 -07:00
parent 7321c6aa45
commit 3b5e042ccc
5 changed files with 28 additions and 52 deletions

View File

@@ -5,7 +5,6 @@ import (
"context"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"fmt"
"io"
"net/http"
@@ -47,10 +46,10 @@ type downloadProgress struct {
// Data passed over to initiate a server transfer.
type serverTransferRequest struct {
ServerID string `binding:"required" json:"server_id"`
URL string `binding:"required" json:"url"`
Token string `binding:"required" json:"token"`
Server json.RawMessage `json:"server"`
ServerID string `binding:"required" json:"server_id"`
URL string `binding:"required" json:"url"`
Token string `binding:"required" json:"token"`
Server installer.ServerDetails `json:"server"`
}
func getArchivePath(sID string) string {