Changeset db484c9 for Farmatiko/Controllers
- Timestamp:
- 01/26/21 10:33:09 (4 years ago)
- Branches:
- master
- Children:
- 7d80751
- Parents:
- 8e74e2f
- Location:
- Farmatiko/Controllers
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/Controllers/AdminController.cs
r8e74e2f rdb484c9 3 3 using System.Linq; 4 4 using System.Threading.Tasks; 5 using FarmatikoData.DTOs; 5 6 using FarmatikoData.Models; 6 7 using FarmatikoServices.FarmatikoServiceInterfaces; … … 46 47 { 47 48 await _service.AddPharmacyHead(pharmacyHead); 48 return Ok( );49 return Ok("Pharmacy added."); 49 50 } 50 51 … … 65 66 [HttpPost] 66 67 [Route("api/pharmacyhead/{Id}")] 67 public async Task<IActionResult> ApproveRequest([FromRoute]int Id, [FromBody]PharmacyHead pharmacyHead)68 public async Task<IActionResult> ApproveRequest([FromRoute]int Id, [FromBody]PharmacyHeadDto pharmacyHead) 68 69 { 69 int id = Id;70 70 await _phservice.UpdatePharmacyHead(pharmacyHead); 71 71 return Ok(); -
Farmatiko/Controllers/FarmatikoController.cs
r8e74e2f rdb484c9 24 24 { 25 25 //_JSONservice.DownloadPharmaciesExcel(); 26 _JSONservice.GetProcessedHealthcareWorkersFromJSON();26 //_JSONservice.GetProcessedHealthcareWorkersFromJSON(); 27 27 //_JSONservice.GetProcessedHealthFacilitiesFromJSON(); 28 28 //_JSONservice.GetProcessedMedicinesFromJSON(); -
Farmatiko/Controllers/LoginController.cs
r8e74e2f rdb484c9 82 82 public ActionResult Logout() 83 83 { 84 // optionally "revoke" JWT token on the server side --> add the current token to a block-list85 // https://github.com/auth0/node-jsonwebtoken/issues/37586 87 84 var userName = User.Identity.Name; 88 85 _jwtAuthManager.RemoveRefreshTokenByUserName(userName); -
Farmatiko/Controllers/PharmacyHeadController.cs
r8e74e2f rdb484c9 1 1 using System.Collections.Generic; 2 2 using System.Threading.Tasks; 3 using FarmatikoData.DTOs; 3 4 using FarmatikoData.Models; 4 5 using FarmatikoServices.FarmatikoServiceInterfaces; … … 19 20 20 21 //GET 21 /* 22 [HttpGet] 23 [Route("api/pharmacyhead")] 24 public async Task<IEnumerable<PharmacyHead>> GetPharmacyHeadInfo() 25 { 26 var PHeads = await _PHService.GetPharmacyHeadInfo(); 27 return PHeads; 28 }*/ 29 22 30 23 [HttpGet] 31 24 [Route("api/pharmacyhead/{Id}")] … … 36 29 } 37 30 //POST 38 /* 39 [HttpPost] 40 [Route("api/pharmacyhead/add")] 41 public async Task<IActionResult> AddPharmacyHead([FromBody] PharmacyHead pharmacyHead) 42 { 43 bool Success = await _PHService.Add(pharmacyHead); 44 return Ok(Success); 45 }*/ 46 47 /*[HttpPost] 48 [Route("api/pharmacyhead/login")] 49 public async Task<int> Login([FromBody]PharmacyHead pharmacyHead) 50 { 51 return await _PHService.Login(pharmacyHead); 52 }*/ 31 53 32 [HttpPut] 54 33 [Route("api/pharmacyhead/update")] 55 public async Task UpdatePharmacyHead([FromBody] PharmacyHeadpharmacyHead)34 public async Task<IActionResult> UpdatePharmacyHead([FromBody] PharmacyHeadDto pharmacyHead) 56 35 { 57 36 await _PHService.UpdatePharmacyHead(pharmacyHead); 37 return Ok(); 58 38 } 59 39 [HttpPost]
Note:
See TracChangeset
for help on using the changeset viewer.