Ignore:
Timestamp:
02/08/21 16:39:25 (4 years ago)
Author:
Dimitar Slezenkovski <dslezenkovski@…>
Branches:
master
Children:
8eb1e21, dae4cde
Parents:
0a694bb
Message:

Fix all bugs

Location:
Farmatiko/Controllers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Farmatiko/Controllers/AdminController.cs

    r0a694bb re0cdea2  
    6161        [HttpPost]
    6262        [Route("api/pharmacyhead/requests/{Id}")]
    63         public IActionResult RejectRequest([FromRoute] int Id)
     63        public IActionResult RejectRequest([FromBody] RequestPharmacyHead req)
    6464        {
    65             bool Success = _adminService.RejectRequest(Id);
     65            bool Success = _adminService.RejectRequest(req);
    6666            return Ok(Success);
    6767        }
  • Farmatiko/Controllers/FarmatikoController.cs

    r0a694bb re0cdea2  
    8484        [HttpGet]
    8585        [Route("api/medicines/search/{query}")]
    86         public async Task<IEnumerable<Medicine>> SearchMedicines([FromRoute] string query)
     86        public async Task<IEnumerable<MedicineDTO>> SearchMedicines([FromRoute] string query)
    8787        {
    8888            return await _service.SearchMedicines(query);
     
    9797        [HttpGet]
    9898        [Route("api/pandemic")]
    99         public async Task<Pandemic> GetPandemic()
     99        public Pandemic GetPandemic()
    100100        {
    101             return await _service.GetPandemic();
     101            return _service.GetPandemic();
    102102        }
    103103        //Pharmacy
     
    111111        [HttpGet]
    112112        [Route("api/pharmacy/search/{Query}")]
    113         public async Task<IEnumerable<Pharmacy>> SearchPharmacies([FromRoute] string Query)
     113        public async Task<IEnumerable<PharmacyDTO>> SearchPharmacies([FromRoute] string Query)
    114114        {
    115115            return await _service.SearchPharmacies(Query);
Note: See TracChangeset for help on using the changeset viewer.