public IActionResult Post([FromBody] PharmacyAdmin pharmacyAdmin)
        {
            // checking id
            if (this.GetUserId() != pharmacyAdmin.UserId)
            {
                return(new StatusCodeResult(401));
            }

            // adding new pharmacy admin
            var result = (int)this._dataManager.Operate <PharmacyAdmin, object>("CreatePharmacyAdmin", pharmacyAdmin);

            // returning action result
            return(this.GetActionResult(result));
        }
Example #2
0
 /// <summary>
 /// Posts pharmacy admin profile
 /// </summary>
 /// <param name="pharmacyAdmin">Pharmacy Admin</param>
 /// <returns>response</returns>
 public async Task <Response <string> > PostPharmacyAdmin(PharmacyAdmin pharmacyAdmin)
 {
     return(await this.PostProfileAsync("pharmacy-admins", pharmacyAdmin));
 }