updated to drop 3, got batch from this.httpClient

This commit is contained in:
vman 2016-09-14 23:20:34 +01:00
parent 833409706f
commit e42a0a5d69
2 changed files with 5 additions and 9 deletions

View File

@ -1,13 +1,13 @@
{
"name": "organisation-chart",
"version": "0.0.1",
"version": "1.0.0",
"private": true,
"engines": {
"node": ">=0.10.0"
},
"dependencies": {
"@microsoft/sp-client-base": "~0.2.0",
"@microsoft/sp-client-preview": "~0.2.0",
"@microsoft/sp-client-base": "~0.2.1",
"@microsoft/sp-client-preview": "~0.3.0",
"office-ui-fabric-react": "0.36.0",
"react": "0.14.8",
"react-dom": "0.14.8"
@ -15,7 +15,7 @@
"devDependencies": {
"@microsoft/sp-build-web": "~0.5.0",
"@microsoft/sp-module-interfaces": "~0.2.0",
"@microsoft/sp-webpart-workbench": "~0.2.0",
"@microsoft/sp-webpart-workbench": "~0.3.0",
"gulp": "~3.9.1",
"office-ui-fabric": "2.6.1"
},

View File

@ -5,14 +5,10 @@ import { IUserProfileService } from '../interfaces/IUserProfileService';
export class UserProfileService implements IUserProfileService {
private httpClient: HttpClient;
private serviceScope: ServiceScope;
constructor(serviceScope: ServiceScope) {
serviceScope.whenFinished(() => {
this.httpClient = serviceScope.consume(httpClientServiceKey);
this.serviceScope = serviceScope;
});
}
@ -39,7 +35,7 @@ export class UserProfileService implements IUserProfileService {
const batchOpts: IODataBatchOptions = {};
const odataBatch: ODataBatch = new ODataBatch(this.serviceScope, batchOpts);
const odataBatch: ODataBatch = this.httpClient.beginBatch(batchOpts);
const userResponses: Promise<Response>[] = [];