public async Task <Notification> ChangeImportant(string username, int nId, bool important) { var notification = await notificationRepo.GetById(nId); if (notification == null) { throw new NotFoundException(); } if (username != notification.Username) { throw new ForbiddenException(); } notification.Important = important; return(await notificationRepo.Update(notification)); }