update test get recipe metadatas

This commit is contained in:
Kenta420 2023-10-05 09:39:25 +07:00
parent 41812591b7
commit 7450796a6b
4 changed files with 95 additions and 37 deletions

View file

@ -60,8 +60,28 @@ export class RecipeService {
return 'coffeethai02_580.json';
}
getRecipesById(id: string): Observable<Recipe01> {
return this._httpClient.get<Recipe01>(environment.api + '/recipes/' + id, {
getRecipesById(id: string): Observable<{
recipe: Recipe01;
recipeMetaData: {
productCode: string;
name: string;
otherName: string;
description: string;
otherDescription: string;
picture: string;
};
}> {
return this._httpClient.get<{
recipe: Recipe01;
recipeMetaData: {
productCode: string;
name: string;
otherName: string;
description: string;
otherDescription: string;
picture: string;
};
}>(environment.api + '/recipes/' + id, {
withCredentials: true,
responseType: 'json',
});