Example #1
0
 public Note DeleteNote(string userId, string noteId)
 {
     if (_rightsRepository.CanUserDeleteNote(Guid.Parse(userId), Guid.Parse(noteId)))
     {
         return(_noteRepository.DeleteNote(Guid.Parse(userId), Guid.Parse(noteId)));
     }
     else
     {
         throw new Exception("No access to delete note.\n");
     }
 }