public async Task <IActionResult> DeleteOrgKeyContacts([FromBody] KeyContacts contact) { var authorizationResult = await _authorizationService.AuthorizeAsync(User, contact.OrgId, AuthzPolicyNames.MustBeOrgAdmin); if (!authorizationResult.Succeeded) { return(Forbid()); } await _keyContactRepository.DeleteOne(contact); return(Ok()); }
public async Task UpdateOne(KeyContacts contact) { await _repo.ReplaceOneAsync(contact); }
public async Task DeleteOne(KeyContacts contact) { await _repo.DeleteOneAsync(x => x.OrgId == contact.OrgId && x.UserId == contact.UserId); }
public async Task InsertOne(KeyContacts contact) { await _repo.InsertOneAsync(contact); }