- Timestamp:
- 02/07/21 16:25:56 (4 years ago)
- Branches:
- master
- Children:
- e0cdea2
- Parents:
- ac51326
- Location:
- Farmatiko/Controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/Controllers/AdminController.cs
rac51326 r0a694bb 44 44 [HttpPost] 45 45 [Route("api/pharmacyhead/add")] 46 public async Task<IActionResult> AddPharmacyHead([FromBody]PharmacyHead pharmacyHead)46 public async Task<IActionResult> AddPharmacyHead([FromBody]PharmacyHeadDto pharmacyHead) 47 47 { 48 await _service.AddPharmacyHead(pharmacyHead); 49 return Ok("Pharmacy added."); 48 bool Success = await _service.AddPharmacyHead(pharmacyHead); 49 if (Success) 50 return Ok("Pharmacy added."); 51 return BadRequest(); 50 52 } 51 53 52 [Http Delete]54 [HttpPost] 53 55 [Route("api/pharmacyhead/delete/{Id}")] 54 56 public async Task<IActionResult> RemovePharmacyHead([FromRoute] int Id) … … 57 59 return Ok(); 58 60 } 59 [Http Delete]61 [HttpPost] 60 62 [Route("api/pharmacyhead/requests/{Id}")] 61 63 public IActionResult RejectRequest([FromRoute] int Id) -
Farmatiko/Controllers/PharmacyHeadController.cs
rac51326 r0a694bb 44 44 return Ok(Success); 45 45 } 46 [HttpDelete]46 /* [HttpDelete] 47 47 [Route("api/pharmacyhead/delete/{Id}")] 48 48 public async Task<IActionResult> Remove([FromRoute] int Id) … … 50 50 bool Success = await _PHService.Remove(Id); 51 51 return Ok(Success); 52 } 53 [HttpPost]52 }*/ 53 /* [HttpPost] 54 54 [Route("api/pharmacyhead/requests/{Id}")] 55 55 public async Task<IActionResult> RemoveClaimingRequest([FromRoute] int Id) … … 57 57 bool Success = await _PHService.RemoveClaimingRequest(Id); 58 58 return Ok(Success); 59 } 59 }*/ 60 60 61 61 }
Note:
See TracChangeset
for help on using the changeset viewer.