UI: added TrendzSettingsService to Services Map
This commit is contained in:
parent
f6bb9be780
commit
338d81e6c1
@ -47,3 +47,4 @@ export * from './user.service';
|
|||||||
export * from './user-settings.service';
|
export * from './user-settings.service';
|
||||||
export * from './widget.service';
|
export * from './widget.service';
|
||||||
export * from './usage-info.service';
|
export * from './usage-info.service';
|
||||||
|
export * from './trendz-settings.service'
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import { Injectable } from '@angular/core';
|
|||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { TrendzSettings } from '@shared/models/trendz-settings.models';
|
import { TrendzSettings } from '@shared/models/trendz-settings.models';
|
||||||
import { defaultHttpOptionsFromConfig } from '@core/http/http-utils';
|
import { defaultHttpOptionsFromConfig, RequestConfig } from '@core/http/http-utils';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@ -29,11 +29,11 @@ export class TrendzSettingsService {
|
|||||||
private http: HttpClient
|
private http: HttpClient
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public getTrendzSettings(): Observable<TrendzSettings> {
|
public getTrendzSettings(config?: RequestConfig): Observable<TrendzSettings> {
|
||||||
return this.http.get<TrendzSettings>(`/api/trendz/settings`, defaultHttpOptionsFromConfig({ignoreLoading: true, ignoreErrors: true}))
|
return this.http.get<TrendzSettings>(`/api/trendz/settings`, defaultHttpOptionsFromConfig(config))
|
||||||
}
|
}
|
||||||
|
|
||||||
public saveTrendzSettings(trendzSettings: TrendzSettings): Observable<TrendzSettings> {
|
public saveTrendzSettings(trendzSettings: TrendzSettings, config?: RequestConfig): Observable<TrendzSettings> {
|
||||||
return this.http.post<TrendzSettings>(`/api/trendz/settings`, trendzSettings, defaultHttpOptionsFromConfig({ignoreLoading: true, ignoreErrors: true}))
|
return this.http.post<TrendzSettings>(`/api/trendz/settings`, trendzSettings, defaultHttpOptionsFromConfig(config))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,6 +52,7 @@ import { UiSettingsService } from '@core/http/ui-settings.service';
|
|||||||
import { UsageInfoService } from '@core/http/usage-info.service';
|
import { UsageInfoService } from '@core/http/usage-info.service';
|
||||||
import { EventService } from '@core/http/event.service';
|
import { EventService } from '@core/http/event.service';
|
||||||
import { AuditLogService } from '@core/http/audit-log.service';
|
import { AuditLogService } from '@core/http/audit-log.service';
|
||||||
|
import { TrendzSettingsService } from '@core/http/trendz-settings.service';
|
||||||
|
|
||||||
export const ServicesMap = new Map<string, Type<any>>(
|
export const ServicesMap = new Map<string, Type<any>>(
|
||||||
[
|
[
|
||||||
@ -91,6 +92,7 @@ export const ServicesMap = new Map<string, Type<any>>(
|
|||||||
['usageInfoService', UsageInfoService],
|
['usageInfoService', UsageInfoService],
|
||||||
['notificationService', NotificationService],
|
['notificationService', NotificationService],
|
||||||
['eventService', EventService],
|
['eventService', EventService],
|
||||||
['auditLogService', AuditLogService]
|
['auditLogService', AuditLogService],
|
||||||
|
['trendzSettingsService', TrendzSettingsService]
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|||||||
@ -62,3 +62,4 @@ export * from './window-message.model';
|
|||||||
export * from './usage.models';
|
export * from './usage.models';
|
||||||
export * from './query/query.models';
|
export * from './query/query.models';
|
||||||
export * from './regex.constants';
|
export * from './regex.constants';
|
||||||
|
export * from './trendz-settings.models'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user