Commit 18f2378e authored by Omar Luna Hernández's avatar Omar Luna Hernández
Browse files

Se agrega el metodo para eliminar un lugar

parent 47cdfcbb
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -125,4 +125,13 @@ export class PlaceDatasourceProd implements PlaceDatasourceInf {
      headers,
    });
  }

  /**
   * Delete an existing place.
   * @param idPlace - The place id to delete.
   * @returns A promise that resolves when the place is deleted.
   */
  async deletePlace(idPlace: number): Promise<void> {
    //await axios.patch(APIUrl + `/place/${idPlace}`)
  }
}
+7 −0
Original line number Diff line number Diff line
@@ -31,4 +31,11 @@ export interface PlaceDatasourceInf {
   * @returns A promise that resolves when the update is complete.
   */
  updatePlace(place: Place): Promise<void>;

  /**
   * Delete an existing place.
   * @param idPlace - The place id to delete.
   * @returns A promise that resolves when the place is deleted.
   */
  deletePlace(idPlace: number): Promise<void>;
}
+9 −0
Original line number Diff line number Diff line
@@ -43,4 +43,13 @@ export class PlaceRepositoryProd implements PlaceRepositoryInf {
  async updatePlace(place: Place): Promise<void> {
    return this.datasouce.updatePlace(place);
  }

  /**
   * Delete an existing place.
   * @param idPlace - The place id to delete.
   * @returns A promise that resolves when the place is deleted.
   */
  async deletePlace(idPlace: number): Promise<void> {
    return this.datasouce.deletePlace(idPlace);
  }
}
+7 −0
Original line number Diff line number Diff line
@@ -31,4 +31,11 @@ export interface PlaceRepositoryInf {
   * @returns A promise that resolves when the place is updated.
   */
  updatePlace(place: Place): Promise<void>;

  /**
   * Delete an existing place.
   * @param idPlace - The place id to delete.
   * @returns A promise that resolves when the place is deleted.
   */
  deletePlace(idPlace: number): Promise<void>;
}