Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

Commit

Permalink
Merge pull request #688 from patrick-rodgers/dev
Browse files Browse the repository at this point in the history
removing NavigationNode update method as it has no affect on server s…
  • Loading branch information
patrick-rodgers committed Jan 9, 2018
2 parents e4496d6 + 89d16f5 commit daa8138
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
1 change: 0 additions & 1 deletion src/sharepoint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export {

export {
NavigationNodeAddResult,
NavigationNodeUpdateResult,
NavigationNodes,
NavigationNode,
} from "./navigation";
Expand Down
35 changes: 0 additions & 35 deletions src/sharepoint/navigation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { Util } from "../utils/util";
import { TypedHash } from "../collections/collections";
import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection } from "./sharepointqueryable";
import { MenuNodeCollection } from "./types";

Expand All @@ -12,15 +10,6 @@ export interface NavigationNodeAddResult {
node: NavigationNode;
}

/**
* Result from udpdating a navigation node
*
*/
export interface NavigationNodeUpdateResult {
data: any;
node: NavigationNode;
}

/**
* Represents a collection of navigation nodes
*
Expand Down Expand Up @@ -92,30 +81,6 @@ export class NavigationNode extends SharePointQueryableInstance {
return new NavigationNodes(this, "Children");
}

/**
* Updates this node based on the supplied properties
*
* @param properties The hash of key/value pairs to update
*/
public update(properties: TypedHash<boolean | string | number>): Promise<NavigationNodeUpdateResult> {

const postBody = JSON.stringify(Util.extend({
"__metadata": { "type": "SP.NavigationNode" },
}, properties));

return this.postCore({
body: postBody,
headers: {
"X-HTTP-Method": "MERGE",
},
}).then((data) => {
return {
data: data,
node: this,
};
});
}

/**
* Deletes this node and any child nodes
*/
Expand Down

0 comments on commit daa8138

Please sign in to comment.