update recipe modal
This commit is contained in:
parent
2b0590709c
commit
ac45ca47d5
4 changed files with 110 additions and 12 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BehaviorSubject, Observable, distinctUntilChanged } from 'rxjs';
|
||||
import { Recipe } from '../models/recipe.model';
|
||||
import { Recipe, Recipe01 } from '../models/recipe.model';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
interface RecipeParams {
|
||||
|
|
@ -33,4 +33,11 @@ export class RecipeService {
|
|||
responseType: 'json',
|
||||
});
|
||||
}
|
||||
|
||||
getRecipesById(id: string): Observable<Recipe01> {
|
||||
return this._httpClient.get<Recipe01>(environment.api + '/recipes/' + id, {
|
||||
withCredentials: true,
|
||||
responseType: 'json',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue