Interfaces/shows-api: rename shows-api-deletion to shows-api-deletion-edit
This commit is contained in:
parent
d9c96be8c4
commit
6461855175
5 changed files with 10 additions and 9 deletions
|
|
@ -6,6 +6,7 @@ import {ShowsApiCreation} from '../../../interfaces/shows-api-creation';
|
|||
import {ToastService} from '../../../services/toast/toast.service';
|
||||
import {Show} from '../../../interfaces/show';
|
||||
import {formatDate} from '@angular/common';
|
||||
import {ShowsApiDeletionEdit} from '../../../interfaces/shows-api-deletion-edit';
|
||||
|
||||
@Component({
|
||||
selector: 'app-create-edit-modal',
|
||||
|
|
|
|||
4
src/interfaces/shows-api-deletion-edit.ts
Normal file
4
src/interfaces/shows-api-deletion-edit.ts
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
export interface ShowsApiDeletionEdit {
|
||||
status: string
|
||||
message: string
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
export interface ShowsApiDeletion {
|
||||
status: string
|
||||
message: string
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ import {NgbModal, NgbModalRef} from '@ng-bootstrap/ng-bootstrap';
|
|||
import {CreateEditModalComponent} from '../../components/create-modal/create-edit-modal/create-edit-modal.component';
|
||||
import {DatePipe} from '@angular/common';
|
||||
import {DeleteModalComponent} from '../../components/delete-modal/delete-modal.component';
|
||||
import {ShowsApiDeletion} from '../../interfaces/shows-api-deletion';
|
||||
import {ShowsApiDeletionEdit} from '../../interfaces/shows-api-deletion-edit';
|
||||
|
||||
@Component({
|
||||
selector: 'app-shows',
|
||||
|
|
@ -64,7 +64,7 @@ export class ShowsComponent {
|
|||
if (result) {
|
||||
if (show._id != null) {
|
||||
this.api.deleteShw(show._id).subscribe({
|
||||
next: (response: ShowsApiDeletion) => {
|
||||
next: (response: ShowsApiDeletionEdit) => {
|
||||
// Do nothing
|
||||
}, error: (err: any) => {
|
||||
console.log(err)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import {Observable} from 'rxjs';
|
|||
import {ShowsApiResponse} from '../../interfaces/shows-api-response';
|
||||
import {ShowsApiCreation} from '../../interfaces/shows-api-creation';
|
||||
import {ShowsApiIdResponse} from '../../interfaces/shows-api-id-response';
|
||||
import {ShowsApiDeletion} from '../../interfaces/shows-api-deletion';
|
||||
import {ShowsApiDeletionEdit} from '../../interfaces/shows-api-deletion-edit';
|
||||
import {Show} from '../../interfaces/show';
|
||||
|
||||
@Injectable({
|
||||
|
|
@ -32,7 +32,7 @@ export class ShowsApiService {
|
|||
return this.http.post<ShowsApiCreation>(this.showsEndpoint, newShow)
|
||||
}
|
||||
|
||||
deleteShw(id: string): Observable<ShowsApiDeletion> {
|
||||
return this.http.delete<ShowsApiDeletion>(this.showsEndpoint + "id/" + id)
|
||||
deleteShw(id: string): Observable<ShowsApiDeletionEdit> {
|
||||
return this.http.delete<ShowsApiDeletionEdit>(this.showsEndpoint + "id/" + id)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue