- Timestamp:
- 11/15/20 19:08:48 (4 years ago)
- Branches:
- master
- Children:
- 8b13eb2
- Parents:
- 1db5673
- Location:
- Farmatiko
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/ClientApp/src/app/admin/admin.component.ts
r1db5673 r68454c6 19 19 public requests: IPharmacyHeadRequest[] = []; 20 20 public head: IPharmacyHead = { 21 id: '',22 21 PharmacyMedicines: null, 23 22 Pharmacy: null, … … 58 57 () => console.log("PharmacyHead inserted")); 59 58 this.head = { 60 id: '',61 59 PharmacyMedicines: null, 62 60 Pharmacy: null, -
Farmatiko/ClientApp/src/app/shared/data.service.ts
r1db5673 r68454c6 180 180 //PharmacyHead PUT 181 181 updatePharmacyHead(head: IPharmacyHead) : Observable<IPharmacyHead> { 182 return this.http.put<IPharmacyHead>(this.basePharmacyHead , head)182 return this.http.put<IPharmacyHead>(this.basePharmacyHead + '/update', head) 183 183 .pipe( 184 184 map((data) => { -
Farmatiko/Controllers/PharmacyHeadController.cs
r1db5673 r68454c6 9 9 { 10 10 [ApiController] 11 [Authorize(Roles = "PharmacyHead ")]11 [Authorize(Roles = "PharmacyHead,Admin")] 12 12 public class PharmacyHeadController : Controller 13 13 { … … 36 36 } 37 37 //POST 38 38 /* 39 39 [HttpPost] 40 40 [Route("api/pharmacyhead/add")] 41 public async Task<IActionResult> AddPharmacyHead([FromBody] PharmacyHead pharmacyHead)41 public async Task<IActionResult> AddPharmacyHead([FromBody] PharmacyHead pharmacyHead) 42 42 { 43 43 bool Success = await _PHService.Add(pharmacyHead); … … 52 52 }*/ 53 53 [HttpPut] 54 [Route("api/pharmacyhead")] 55 [Authorize(Roles = "Admin")] 56 [Authorize(Roles = "PharmacyHead")] 54 [Route("api/pharmacyhead/update")] 57 55 public async Task UpdatePharmacyHead([FromBody]PharmacyHead pharmacyHead) 58 56 {
Note:
See TracChangeset
for help on using the changeset viewer.