public bool VerifyPin(VerifyPinWebModel model) { var db = new ApplicationDbContext(); bool verified = new UserProfileLogic(db).VerifyPin(model.AthleteID, model.Pin); return(verified); }
public async Task <bool?> VerifyPin(int athleteID, string pin) { string url = WebApiUrl + "People/VerifyPin"; try { VerifyPinWebModel model = new VerifyPinWebModel() { AthleteID = athleteID, Pin = pin, }; string json = await this.sendPostRequestAndReceiveResponse(url, model, true); bool modelResponse = JsonConvert.DeserializeObject <bool>(json); return(modelResponse); } catch (Exception exc) { LastExceptionUrl = url; LastException = exc; return(null); } }