F: add config service
This commit is contained in:
1 parent
5dc5a023b8
commit
13f68fcac6
2 files changed
+30
-6
No files matched your search
@@ -19,6 +19,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { SharedModule } from '../shared/shared.module';
|
||||
import { SearchPopupEntryLineComponent } from './components/search-popup-entry-line/search-popup-entry-line.component';
|
||||
import { ScrollService } from './services/scroll.service';
|
||||
import { ConfigService } from './services/config.service';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@@ -35,16 +36,17 @@ import { ScrollService } from './services/scroll.service';
|
||||
ReactiveFormsModule,
|
||||
],
|
||||
providers: [
|
||||
TmdbService,
|
||||
LibraryService,
|
||||
EntryService,
|
||||
EntrySeenService,
|
||||
CollectionService,
|
||||
ToggleService,
|
||||
EpisodeService,
|
||||
EntrySeenService,
|
||||
EntryService,
|
||||
EpisodeSeenService,
|
||||
EpisodeService,
|
||||
LibraryService,
|
||||
SeasonService,
|
||||
|
||||
TmdbService,
|
||||
|
||||
ConfigService,
|
||||
ScrollService,
|
||||
ToggleService,
|
||||
ThemeService,
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { environment } from '../../../environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ConfigService {
|
||||
constructor() {}
|
||||
|
||||
public getBackendApiUrl(): string {
|
||||
return environment.API_URL;
|
||||
}
|
||||
|
||||
public getTmdbApiUrl(): string {
|
||||
return environment.TMDB_API_URL;
|
||||
}
|
||||
|
||||
public getTmdbApiKey(): string {
|
||||
return environment.TMDB_API_KEY;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user