Skip to content

Commit

Permalink
Merge pull request #55 from kaovd/patch-1
Browse files Browse the repository at this point in the history
NamedLocations: Set OData types in UpdateCountry / UpdateIP functions
  • Loading branch information
manicminer committed Jun 1, 2021
2 parents df04900 + c0d4be6 commit 131b2b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions msgraph/namedlocations.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ func (c *NamedLocationsClient) GetCountry(ctx context.Context, id string) (*Coun
// UpdateIP amends an existing IP Named Location.
func (c *NamedLocationsClient) UpdateIP(ctx context.Context, ipNamedLocation IPNamedLocation) (int, error) {
var status int

ipNamedLocation.ODataType = utils.StringPtr("#microsoft.graph.ipNamedLocation")

body, err := json.Marshal(ipNamedLocation)
if err != nil {
Expand All @@ -248,6 +250,8 @@ func (c *NamedLocationsClient) UpdateIP(ctx context.Context, ipNamedLocation IPN
// UpdateCountry amends an existing Country Named Location.
func (c *NamedLocationsClient) UpdateCountry(ctx context.Context, countryNamedLocation CountryNamedLocation) (int, error) {
var status int

countryNamedLocation.ODataType = utils.StringPtr("#microsoft.graph.countryNamedLocation")

body, err := json.Marshal(countryNamedLocation)
if err != nil {
Expand Down

0 comments on commit 131b2b3

Please sign in to comment.