import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { DynaDataService } from '@xdf/gallery';
import { Observable } from 'rxjs';

@Injectable({providedIn: 'root'})
export class PassengerService extends DynaDataService {
    constructor(private httpClient: HttpClient) {
        super(httpClient);
    }

    edit(data: any, id: any): Observable<object> {
        this.serviceURL = '/service/passengers/edit';
        return super.update(id, data);
    }

    create(data: any): Observable<object> {
        this.serviceURL = '/service/passengers/create';
        return super.create(data);
    }

    getResultList() {
        this.serviceURL = '/service/passengers';
        return super.getResultList(this.serviceURL);
    }

    getResult(id: any): Observable<object> {
        this.serviceURL = '/service/passengers';
        return super.getResult(id);
    }

}
