Allow remote-to-remote sync pairs
This commit is contained in:
@@ -75,8 +75,8 @@ func (h *SyncPairHandler) Create(w http.ResponseWriter, r *http.Request) {
|
||||
writeError(w, http.StatusBadRequest, "direction must be push, pull, or mirror")
|
||||
return
|
||||
}
|
||||
if req.SourceMachineID != nil && req.DestMachineID != nil {
|
||||
writeError(w, http.StatusBadRequest, "both source and destination cannot be remote machines; one side must be the server (set one MachineID to null)")
|
||||
if req.SourceMachineID != nil && req.DestMachineID != nil && *req.SourceMachineID == *req.DestMachineID {
|
||||
writeError(w, http.StatusBadRequest, "source and destination cannot be the same machine")
|
||||
return
|
||||
}
|
||||
if req.RsyncFlags == "" {
|
||||
@@ -131,8 +131,8 @@ func (h *SyncPairHandler) Update(w http.ResponseWriter, r *http.Request) {
|
||||
writeError(w, http.StatusBadRequest, "direction must be push, pull, or mirror")
|
||||
return
|
||||
}
|
||||
if req.SourceMachineID != nil && req.DestMachineID != nil {
|
||||
writeError(w, http.StatusBadRequest, "both source and destination cannot be remote machines; one side must be the server (set one MachineID to null)")
|
||||
if req.SourceMachineID != nil && req.DestMachineID != nil && *req.SourceMachineID == *req.DestMachineID {
|
||||
writeError(w, http.StatusBadRequest, "source and destination cannot be the same machine")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user