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

Commit

Permalink
adding fieldlinks class
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-rodgers committed Jan 5, 2017
1 parent 43261b6 commit 3155a9b
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/sharepoint/contenttypes.ts
Expand Up @@ -146,22 +146,9 @@ export class FieldLinks extends QueryableCollection {
*/
public getById(id: string) {
let fl = new FieldLink(this);
fl.concat(`(${id})`);
fl.concat(`('${id}')`);
return fl;
}

/**
* Reorders the fields in the content type (limited functionality in REST)
*
* @param internalFieldNames string array of internal field names in the order they should appear in the content type
*/
public reorder(internalFieldNames: string[]): Promise<any> {

let reorder = new FieldLinks(this, "reorder");
return reorder.post({
body: JSON.stringify({ internalNames: internalFieldNames }),
});
}
}

/**
Expand All @@ -177,11 +164,4 @@ export class FieldLink extends QueryableInstance {
constructor(baseUrl: string | Queryable, path?: string) {
super(baseUrl, path);
}

/**
* Delets this FieldLink instance
*/
public delete(): Promise<any> {
return this.delete();
}
}

0 comments on commit 3155a9b

Please sign in to comment.