| 35 | ) |
| 36 | |
| 37 | func FeeadbackExtend(auth model.Auth, workspaceInfo workspace.WorkspaceInfo) error { |
| 38 | host := auth.LoginUrl |
| 39 | token := auth.Token.(string) |
| 40 | url := fmt.Sprint(host, "/api/smartide/workspace/update") |
| 41 | params := make(map[string]interface{}) |
| 42 | params["ID"] = workspaceInfo.ServerWorkSpace.ID |
| 43 | params["Extend"] = workspaceInfo.Extend.ToJson() |
| 44 | headers := map[string]string{ |
| 45 | "x-token": token, |
| 46 | } |
| 47 | |
| 48 | httpClient := common.CreateHttpClientEnableRetry() |
| 49 | _, err := httpClient.Put(url, params, headers) |
| 50 | |
| 51 | return err |
| 52 | } |
| 53 | |
| 54 | // 触发 remove |
| 55 | func Trigger_Action(action string, serverWorkspaceNo string, auth model.Auth, datas map[string]interface{}) error { |