test expose style

This commit is contained in:
pakintada@gmail.com 2024-02-09 17:02:02 +07:00
parent 8f09e50172
commit c9fd7baf9d
5 changed files with 25 additions and 13 deletions

View file

@ -1,4 +1,4 @@
import { HttpClient } from '@angular/common/http';
import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable, count } from 'rxjs';
import { environment } from 'src/environments/environment';
@ -64,14 +64,16 @@ export class ToppingService {
let asyncCountry = await this._recipeService.getCurrentCountry();
country = getCountryMapSwitcher(asyncCountry);
let qParam = new HttpParams();
qParam = qParam.append('country', country);
qParam = qParam.append('filename', filename);
return this._httpClient.get<ToppingGroup[]>(
`${environment.api}/toppings/groups`,
`${environment.api}/toppover/groups`,
{
params: {
country: country,
filename: filename,
},
params: qParam,
withCredentials: true,
responseType: 'json',
}
);
}
@ -84,14 +86,16 @@ export class ToppingService {
let asyncCountry = await this._recipeService.getCurrentCountry();
country = getCountryMapSwitcher(asyncCountry);
let qParam = new HttpParams();
qParam = qParam.append('country', country);
qParam = qParam.append('filename', filename);
return this._httpClient.get<ToppingList[]>(
`${environment.api}/toppings/lists`,
`${environment.api}/toppover/lists`,
{
params: {
country: country,
filename: filename,
},
params: qParam,
withCredentials: true,
responseType: 'json',
}
);
}

View file

@ -1,4 +1,4 @@
export const environment = {
production: true,
api: 'https://recipe.taobin.io:8090/api',
api: 'http://10.11.77.50:5555',
};