Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: TT-501 change of name of route
  • Loading branch information
Davcg5 committed Jan 18, 2022
commit d72c90b590cc2f44d0843b87bb8a1d77f398d207
6 changes: 3 additions & 3 deletions src/app/modules/time-clock/services/entry.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe('EntryService', () => {
const pipe: DatePipe = new DatePipe('en');
const timeRange: TimeEntriesTimeRange = {start_date: yesterday, end_date: today};
const userId = '123';
const reportsUrl = service.baseUrl + '-range';
const reportsUrl = service.baseUrl + '/report';
service.loadEntriesByTimeRange(timeRange, userId).subscribe();

const loadEntryRequest = httpMock.expectOne(req => req.method === 'GET' && req.url === reportsUrl);
Expand All @@ -120,7 +120,7 @@ describe('EntryService', () => {
const today = moment(new Date());
const timeRange: TimeEntriesTimeRange = { start_date: yesterday, end_date: today };
const userId = '123';
const reportsUrl = service.baseUrl + '-range';
const reportsUrl = service.baseUrl + '/report';
service.loadEntriesByTimeRange(timeRange, userId).subscribe();

const loadEntryRequest = httpMock.expectOne(req => req.method === 'GET' && req.url === reportsUrl);
Expand All @@ -132,7 +132,7 @@ describe('EntryService', () => {
const today = moment(new Date());
const timeRange: TimeEntriesTimeRange = { start_date: yesterday, end_date: today };
const userId = '123';
const reportsUrl = service.baseUrl + '-range';
const reportsUrl = service.baseUrl + '/report';

service.loadEntriesByTimeRange(timeRange, userId).subscribe();

Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/time-clock/services/entry.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class EntryService {

loadEntriesByTimeRange(range: TimeEntriesTimeRange, userId: string): Observable<any> {
const MAX_NUMBER_OF_ENTRIES_FOR_REPORTS = 9999;
const loadEntriesByTimeRangeURL = this.baseUrl + '-range';
const loadEntriesByTimeRangeURL = this.baseUrl + '/report';
return this.http.get(loadEntriesByTimeRangeURL,
{
params: {
Expand Down