#580 fix activiti task list http calls

This commit is contained in:
Denys Vuika
2016-08-22 15:40:42 +01:00
parent 6abd726f72
commit 063f403762
4 changed files with 9 additions and 4 deletions

View File

@@ -18,6 +18,7 @@ module.exports = function (config) {
{pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false},
{pattern: 'node_modules/ng2-alfresco-datatable/dist/**/*.js', included: false, served: true, watched: false},
{pattern: 'node_modules/ng2-translate/**/*.js', included: false, served: true, watched: false},
{pattern: 'node_modules/alfresco-js-api/dist/alfresco-js-api.js', included: true, watched: false},
{pattern: 'karma-test-shim.js', included: true, watched: true},

View File

@@ -48,7 +48,7 @@ describe('ActivitiFilters', () => {
});
beforeEach(() => {
let activitiService = new ActivitiTaskListService(null, null);
let activitiService = new ActivitiTaskListService(null, null, null);
filterList = new ActivitiFilters(null, null, activitiService);
});

View File

@@ -64,7 +64,7 @@ describe('ActivitiTaskList', () => {
});
beforeEach(() => {
let activitiSerevice = new ActivitiTaskListService(null, null);
let activitiSerevice = new ActivitiTaskListService(null, null, null);
taskList = new ActivitiTaskList(null, null, activitiSerevice);
});

View File

@@ -19,6 +19,7 @@ import { Injectable } from '@angular/core';
import { AlfrescoSettingsService } from 'ng2-alfresco-core';
import { Http, Headers, RequestOptions, Response } from '@angular/http';
import { Observable } from 'rxjs/Rx';
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
import { FilterModel } from '../models/filter.model';
import { FilterParamsModel } from '../models/filter.model';
import { Comment } from '../models/comment.model';
@@ -29,7 +30,9 @@ import { TaskDetailsModel } from '../models/task-details.model';
@Injectable()
export class ActivitiTaskListService {
constructor(private http: Http, public alfrescoSettingsService: AlfrescoSettingsService) {
constructor(private http: Http,
public alfrescoSettingsService: AlfrescoSettingsService,
private authService: AlfrescoAuthenticationService) {
}
@@ -249,7 +252,8 @@ export class ActivitiTaskListService {
private getHeaders(): Headers {
return new Headers({
'Accept': 'application/json',
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'Authorization': this.authService.getTicket('BPM')
});
}