add announcement service
parent
512465964d
commit
780f515449
@ -0,0 +1,12 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AnnouncementService } from './announcement.service';
|
||||
|
||||
describe('AnnouncementService', () => {
|
||||
beforeEach(() => TestBed.configureTestingModule({}));
|
||||
|
||||
it('should be created', () => {
|
||||
const service: AnnouncementService = TestBed.get(AnnouncementService);
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,30 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Request } from 'src/app/hmg-common/services/models/request';
|
||||
import { Observable } from 'rxjs';
|
||||
import { AuthenticationService } from '../authentication/authentication.service';
|
||||
import { ConnectorService } from '../connector/connector.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AnnouncementService {
|
||||
public static getAnnouncemntList = '';
|
||||
|
||||
constructor(
|
||||
public authService: AuthenticationService,
|
||||
public con: ConnectorService,
|
||||
) { }
|
||||
|
||||
|
||||
getAnnouncementListService(onError ?: any , oerrorLable ?: any) {
|
||||
const request = new Request();
|
||||
this.authService.authenticateRequest(request);
|
||||
console.log(request);
|
||||
return this.con.post(
|
||||
AnnouncementService.getAnnouncemntList,
|
||||
request,
|
||||
onError,
|
||||
oerrorLable
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue