PricePinion / PricePinion-Backend

This repo is the backend for PricePinion.
https://pricepinion-backend.azurewebsites.net/
0 stars 2 forks source link

SFL upon saving data successfully, passes no response. #40

Closed maslindc2 closed 4 months ago

maslindc2 commented 4 months ago

Frontend claims that 204 status is not being received. This behavior does not extend to Postman, where 204 status does appear. Requires investigation on both backend and frontend.

maslindc2 commented 4 months ago

Issue was with Frontend code. The original code did not observe the response...thus the status never appeared. Original Function in the product service.

//save a product in SaveForLater
  setSaveForLater(productID: string): Observable<any> {
    return this.http.post<any>(`http://localhost:8080/api/customer/save-for-later`, { productID });
  }

Fixed Function

//save a product in SaveForLater
  setSaveForLater(productID: string): Observable<any> {
    return this.http.post<any>(`http://localhost:8080/api/customer/save-for-later`, { productID }, {observe: "response"});
  }