Services/shows: refactor
This commit is contained in:
parent
42329818a5
commit
afa9b4a4a1
1 changed files with 2 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ import {ShowsApiResponse} from '../../interfaces/shows-api-response';
|
||||||
import {ShowsApiCreation} from '../../interfaces/shows-api-creation';
|
import {ShowsApiCreation} from '../../interfaces/shows-api-creation';
|
||||||
import {ShowsApiIdResponse} from '../../interfaces/shows-api-id-response';
|
import {ShowsApiIdResponse} from '../../interfaces/shows-api-id-response';
|
||||||
import {ShowsApiDeletion} from '../../interfaces/shows-api-deletion';
|
import {ShowsApiDeletion} from '../../interfaces/shows-api-deletion';
|
||||||
|
import {Show} from '../../interfaces/show';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
|
|
@ -27,7 +28,7 @@ export class ShowsApiService {
|
||||||
return this.http.get<ShowsApiIdResponse>(this.showsEndpoint + "id/" + id)
|
return this.http.get<ShowsApiIdResponse>(this.showsEndpoint + "id/" + id)
|
||||||
}
|
}
|
||||||
|
|
||||||
sendShow(newShow: {}) {
|
sendShow(newShow: Show): Observable<ShowsApiCreation> {
|
||||||
return this.http.post<ShowsApiCreation>(this.showsEndpoint, newShow)
|
return this.http.post<ShowsApiCreation>(this.showsEndpoint, newShow)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue