Beispiel #1
0
        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());
        }
Beispiel #2
0
 public async Task UpdateOne(KeyContacts contact)
 {
     await _repo.ReplaceOneAsync(contact);
 }
Beispiel #3
0
 public async Task DeleteOne(KeyContacts contact)
 {
     await _repo.DeleteOneAsync(x => x.OrgId == contact.OrgId && x.UserId == contact.UserId);
 }
Beispiel #4
0
 public async Task InsertOne(KeyContacts contact)
 {
     await _repo.InsertOneAsync(contact);
 }