Services/shows: add function to remove show
This commit is contained in:
parent
bd10e76379
commit
1b19988279
2 changed files with 9 additions and 0 deletions
4
src/interfaces/shows-api-deletion.ts
Normal file
4
src/interfaces/shows-api-deletion.ts
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
export interface ShowsApiDeletion {
|
||||||
|
status: string
|
||||||
|
message: string
|
||||||
|
}
|
||||||
|
|
@ -4,6 +4,7 @@ import {Observable} from 'rxjs';
|
||||||
import {ShowsApiResponse} from '../../interfaces/shows-api-response';
|
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';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
|
|
@ -29,4 +30,8 @@ export class ShowsApiService {
|
||||||
sendShow(newShow: {}) {
|
sendShow(newShow: {}) {
|
||||||
return this.http.post<ShowsApiCreation>(this.showsEndpoint, newShow)
|
return this.http.post<ShowsApiCreation>(this.showsEndpoint, newShow)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deleteShw(id: string): Observable<ShowsApiDeletion> {
|
||||||
|
return this.http.delete<ShowsApiDeletion>(this.showsEndpoint + "id/" + id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue