From 89d16f502cc111e2f4270b5b70b7eea311d0b8b7 Mon Sep 17 00:00:00 2001 From: Patrick Rodgers Date: Tue, 9 Jan 2018 10:45:38 -0500 Subject: [PATCH] removing NavigationNode update method as it has no affect on server side. ref #687 --- src/sharepoint/index.ts | 1 - src/sharepoint/navigation.ts | 35 ----------------------------------- 2 files changed, 36 deletions(-) diff --git a/src/sharepoint/index.ts b/src/sharepoint/index.ts index fc97cc0c..967cf46b 100644 --- a/src/sharepoint/index.ts +++ b/src/sharepoint/index.ts @@ -48,7 +48,6 @@ export { export { NavigationNodeAddResult, - NavigationNodeUpdateResult, NavigationNodes, NavigationNode, } from "./navigation"; diff --git a/src/sharepoint/navigation.ts b/src/sharepoint/navigation.ts index fef240f6..4b9e57b8 100644 --- a/src/sharepoint/navigation.ts +++ b/src/sharepoint/navigation.ts @@ -1,5 +1,3 @@ -import { Util } from "../utils/util"; -import { TypedHash } from "../collections/collections"; import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection } from "./sharepointqueryable"; import { MenuNodeCollection } from "./types"; @@ -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 * @@ -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): Promise { - - 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 */