|
@ -11,15 +11,19 @@ func Edit(channel models.Channel, logged, hub *bool, eventName, locationName *st |
|
|
|
|
|
|
|
|
if logged != nil && *logged != channel.Logged { |
|
|
if logged != nil && *logged != channel.Logged { |
|
|
mutation["logged"] = *logged |
|
|
mutation["logged"] = *logged |
|
|
|
|
|
channel.Logged = *logged |
|
|
} |
|
|
} |
|
|
if hub != nil && *hub != channel.Hub { |
|
|
if hub != nil && *hub != channel.Hub { |
|
|
mutation["hub"] = *hub |
|
|
mutation["hub"] = *hub |
|
|
|
|
|
channel.Hub = *hub |
|
|
} |
|
|
} |
|
|
if eventName != nil && *eventName != channel.EventName { |
|
|
if eventName != nil && *eventName != channel.EventName { |
|
|
mutation["eventName"] = *eventName |
|
|
mutation["eventName"] = *eventName |
|
|
|
|
|
channel.EventName = *eventName |
|
|
} |
|
|
} |
|
|
if locationName != nil && *locationName != channel.LocationName { |
|
|
if locationName != nil && *locationName != channel.LocationName { |
|
|
mutation["locationName"] = *locationName |
|
|
mutation["locationName"] = *locationName |
|
|
|
|
|
channel.LocationName = *locationName |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if len(mutation) == 0 { |
|
|
if len(mutation) == 0 { |
|
|