Merge branch 'nightly' into license-1
This commit is contained in:
+11
-10
@@ -69,11 +69,12 @@ var debug = false
|
||||
//var syncUrl = "http://localhost:5002"
|
||||
|
||||
type retStruct struct {
|
||||
Success bool `json:"success"`
|
||||
SyncFeatures shuffle.SyncFeatures `json:"sync_features"`
|
||||
SessionKey string `json:"session_key"`
|
||||
IntervalSeconds int64 `json:"interval_seconds"`
|
||||
Reason string `json:"reason"`
|
||||
Success bool `json:"success"`
|
||||
SyncFeatures shuffle.SyncFeatures `json:"sync_features"`
|
||||
SessionKey string `json:"session_key"`
|
||||
IntervalSeconds int64 `json:"interval_seconds"`
|
||||
Reason string `json:"reason"`
|
||||
Subscriptions []shuffle.PaymentSubscription `json:"subscriptions"`
|
||||
}
|
||||
|
||||
type Contact struct {
|
||||
@@ -3870,10 +3871,11 @@ func handleCloudJob(job shuffle.CloudSyncJob) error {
|
||||
// Handles jobs from remote (cloud)
|
||||
func remoteOrgJobController(org shuffle.Org, body []byte) error {
|
||||
type retStruct struct {
|
||||
Success bool `json:"success"`
|
||||
Reason string `json:"reason"`
|
||||
Jobs []shuffle.CloudSyncJob `json:"jobs"`
|
||||
Success bool `json:"success"`
|
||||
Reason string `json:"reason"`
|
||||
Jobs []shuffle.CloudSyncJob `json:"jobs"`
|
||||
SyncFeatures shuffle.SyncFeatures `json:"sync_features"`
|
||||
Subscriptions []shuffle.PaymentSubscription `json:"subscriptions"`
|
||||
}
|
||||
|
||||
responseData := retStruct{}
|
||||
@@ -4711,6 +4713,7 @@ func handleStopCloudSync(syncUrl string, org shuffle.Org) (*shuffle.Org, error)
|
||||
org.CloudSync = false
|
||||
org.SyncFeatures = shuffle.SyncFeatures{}
|
||||
org.SyncConfig = shuffle.SyncConfig{}
|
||||
org.Subscriptions = []shuffle.PaymentSubscription{}
|
||||
|
||||
err = shuffle.SetOrg(ctx, org, org.Id)
|
||||
if err != nil {
|
||||
@@ -4926,8 +4929,6 @@ func handleCloudSetup(resp http.ResponseWriter, request *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("[DEBUG] Respbody from sync: %s", string(respBody))
|
||||
|
||||
responseData := retStruct{}
|
||||
err = json.Unmarshal(respBody, &responseData)
|
||||
if err != nil {
|
||||
|
||||
@@ -1847,13 +1847,12 @@ func getWorkflowApps(resp http.ResponseWriter, request *http.Request) {
|
||||
workflowapps, err := shuffle.GetAllWorkflowApps(ctx, 1000, 0)
|
||||
if err != nil {
|
||||
log.Printf("{WARNING] Failed getting apps (getworkflowapps): %s", err)
|
||||
resp.WriteHeader(401)
|
||||
resp.WriteHeader(400)
|
||||
resp.Write([]byte(`{"success": false}`))
|
||||
return
|
||||
}
|
||||
|
||||
newapps := workflowapps
|
||||
|
||||
if len(user.PrivateApps) > 0 {
|
||||
found := false
|
||||
for _, item := range user.PrivateApps {
|
||||
|
||||
Reference in New Issue
Block a user