|
@ -13,7 +13,6 @@ type signup struct { |
|
|
ConfirmPassword string `json:"confirm_password"` |
|
|
ConfirmPassword string `json:"confirm_password"` |
|
|
PublicKey string `json:"asymmetric_public_key"` |
|
|
PublicKey string `json:"asymmetric_public_key"` |
|
|
PrivateKey string `json:"asymmetric_private_key"` |
|
|
PrivateKey string `json:"asymmetric_private_key"` |
|
|
SymmetricKey string `json:"symmetric_key"` |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Signup to the platform
|
|
|
// Signup to the platform
|
|
@ -33,8 +32,7 @@ func Signup(w http.ResponseWriter, r *http.Request) { |
|
|
user.Password == "" || |
|
|
user.Password == "" || |
|
|
user.ConfirmPassword == "" || |
|
|
user.ConfirmPassword == "" || |
|
|
len(user.AsymmetricPrivateKey) == 0 || |
|
|
len(user.AsymmetricPrivateKey) == 0 || |
|
|
len(user.AsymmetricPublicKey) == 0 || |
|
|
|
|
|
len(user.SymmetricKey) == 0 { |
|
|
|
|
|
|
|
|
len(user.AsymmetricPublicKey) == 0 { |
|
|
|
|
|
|
|
|
http.Error(w, "Invalid Data", http.StatusUnprocessableEntity) |
|
|
http.Error(w, "Invalid Data", http.StatusUnprocessableEntity) |
|
|
return |
|
|
return |
|
|