added env with api key
This commit is contained in:
parent
1249502085
commit
8b509cc83b
3
.gitignore
vendored
3
.gitignore
vendored
@ -40,3 +40,6 @@ testem.log
|
||||
# System files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# api-key
|
||||
env.ts
|
@ -3,6 +3,7 @@ import { HttpClient, HttpErrorResponse, HttpHeaders, HttpParams } from '@angular
|
||||
import { Observable, catchError, throwError } from 'rxjs';
|
||||
import { HoroscopeData } from '../models/horoscope.model';
|
||||
import * as alertifyjs from 'alertifyjs';
|
||||
import { env } from 'env';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@ -15,7 +16,8 @@ export class OpenHoroscopeService {
|
||||
|
||||
const url = 'https://horoscope-astrology.p.rapidapi.com/sign?';
|
||||
const headers = new HttpHeaders({
|
||||
'X-RapidAPI-Key': '5016ac0ebdmsha06ee5d995fe2c4p108e0fjsn03c8c4f21287',
|
||||
//'X-RapidAPI-Key': '5016ac0ebdmsha06ee5d995fe2c4p108e0fjsn03c8c4f21287',
|
||||
'X-RapidAPI-Key': env.API_KEY,
|
||||
'X-RapidAPI-Host': 'horoscope-astrology.p.rapidapi.com'
|
||||
});
|
||||
const params = new HttpParams()
|
||||
|
@ -4,6 +4,8 @@ import { NumerologyData } from '../models/numerology.model';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
import { catchError, throwError } from 'rxjs';
|
||||
import * as alertifyjs from 'alertifyjs';
|
||||
import { DefinePlugin, webpack } from 'webpack';
|
||||
import { env } from 'env';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@ -16,7 +18,7 @@ export class OpenNumerologyService {
|
||||
|
||||
const url = 'https://horoscope-astrology.p.rapidapi.com/numerology?';
|
||||
const headers = new HttpHeaders({
|
||||
'X-RapidAPI-Key': '5016ac0ebdmsha06ee5d995fe2c4p108e0fjsn03c8c4f21287',
|
||||
'X-RapidAPI-Key': env.API_KEY,
|
||||
'X-RapidAPI-Host': 'horoscope-astrology.p.rapidapi.com'
|
||||
});
|
||||
const params = new HttpParams()
|
||||
|
@ -3,7 +3,7 @@
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/app",
|
||||
"types": []
|
||||
"types": ["node"]
|
||||
},
|
||||
"files": [
|
||||
"src/main.ts"
|
||||
|
Loading…
Reference in New Issue
Block a user