Add transfer of channel after all video's have been transferred
Add channel status call to notify external db that the channel has been transferred.
This commit is contained in:
parent
45cea808ed
commit
eb2f6273e4
3 changed files with 40 additions and 4 deletions
sdk
|
@ -133,7 +133,7 @@ func (a *APIConfig) SetChannelCert(certHex string, channelID string) error {
|
|||
|
||||
}
|
||||
|
||||
func (a *APIConfig) SetChannelStatus(channelID string, status string, failureReason string) (map[string]SyncedVideo, map[string]bool, error) {
|
||||
func (a *APIConfig) SetChannelStatus(channelID string, status string, failureReason string, transferState int) (map[string]SyncedVideo, map[string]bool, error) {
|
||||
type apiChannelStatusResponse struct {
|
||||
Success bool `json:"success"`
|
||||
Error null.String `json:"error"`
|
||||
|
@ -148,6 +148,7 @@ func (a *APIConfig) SetChannelStatus(channelID string, status string, failureRea
|
|||
"auth_token": {a.ApiToken},
|
||||
"sync_status": {status},
|
||||
"failure_reason": {failureReason},
|
||||
"transferred": {strconv.Itoa(transferState)},
|
||||
})
|
||||
defer res.Body.Close()
|
||||
body, _ := ioutil.ReadAll(res.Body)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue