public async Task <IHttpActionResult> GetClothesByUserId(ClothesTrackingEnum clotheStatus) { try { var result = ClothesTrackingService.GetByUserGuidId(userGuidId, clotheStatus); return(Ok(result)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IHttpActionResult> GetClothesById(string id) { try { var result = ClothesTrackingService.GetClothesById(id); return(Ok(result)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IHttpActionResult> GetClotheHistory(long clotheId, int page, int size) { try { var result = this.ClothesTrackingService.GetClotheHistory(userGuidId, clotheId, page, size); var counter = ClothesTrackingService.GetCounterOfHistory(clotheId); return(Ok(new { Items = result, Counter = counter })); } catch (Exception ex) { return(BadRequest(ex.Message)); } }