Skip to content

Commit 9af4e4b

Browse files
author
Nicole Garcia
committed
refactor: change endpoints route
1 parent efded51 commit 9af4e4b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.dev.env

0 Bytes
Binary file not shown.

src/app/modules/customer-management/components/projects/components/services/project.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class ProjectService {
2525
}
2626

2727
getRecentProjects(): Observable<Project[]> {
28-
return this.http.get<Project[]>(`${this.url}/recent`);
28+
return this.http.get<Project[]>(`${this.url}/recent/`);
2929
}
3030

3131
createProject(projectData): Observable<any> {

src/app/modules/shared/interceptors/inject.token.interceptor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class InjectTokenInterceptor implements HttpInterceptor {
2626
const token = this.isProduction ? this.azureAdB2CService.getBearerToken() : this.loginService.getBearerToken();
2727
const requestWithHeaders = request.clone(
2828
{
29-
headers: request.headers.set('Authorization',
29+
headers: request.headers.set('token',
3030
'Bearer ' + token)
3131
});
3232
return next.handle(requestWithHeaders)

src/app/modules/time-clock/services/entry.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class EntryService {
2323
urlInProductionLegacy = environment.production === EnvironmentType.TT_PROD_LEGACY;
2424

2525
loadActiveEntry(): Observable<any> {
26-
return this.http.get(`${this.baseUrl}/running`);
26+
return this.http.get(`${this.baseUrl}/running/`);
2727
}
2828

2929
loadEntries(date): Observable<any> {
@@ -47,7 +47,7 @@ export class EntryService {
4747

4848
stopEntryRunning(idEntry: string): Observable<any> {
4949
return (this.urlInProductionLegacy ?
50-
this.http.post(`${this.baseUrl}/${idEntry}/stop`, null) : this.http.put(`${this.baseUrl}/stop`, null) );
50+
this.http.post(`${this.baseUrl}/${idEntry}/stop/`, null) : this.http.put(`${this.baseUrl}/stop/`, null) );
5151
}
5252

5353
restartEntry(idEntry: string): Observable<Entry> {
@@ -57,7 +57,7 @@ export class EntryService {
5757

5858
summary(): Observable<TimeEntriesSummary> {
5959
const timeOffset = new Date().getTimezoneOffset();
60-
const summaryUrl = `${this.baseUrl}/summary?time_offset=${timeOffset}`;
60+
const summaryUrl = `${this.baseUrl}/summary/?time_offset=${timeOffset}`;
6161
return this.http.get<TimeEntriesSummary>(summaryUrl);
6262
}
6363

@@ -70,7 +70,7 @@ export class EntryService {
7070

7171
loadEntriesByTimeRange(range: TimeEntriesTimeRange, userId: string): Observable<any> {
7272
const MAX_NUMBER_OF_ENTRIES_FOR_REPORTS = 9999;
73-
const loadEntriesByTimeRangeURL = this.urlInProductionLegacy ? this.baseUrl : this.baseUrl + '/report';
73+
const loadEntriesByTimeRangeURL = this.urlInProductionLegacy ? this.baseUrl : this.baseUrl + '/report/';
7474
return this.http.get(loadEntriesByTimeRangeURL,
7575
{
7676
params: {

0 commit comments

Comments
 (0)