diff --git a/Source/Application/Kysect.Shreks.Application.Handlers/Github/AddGithubUserAssociationHandler.cs b/Source/Application/Kysect.Shreks.Application.Handlers/Github/AddGithubUserAssociationHandler.cs index 3cb3a3dc2..c5ed99db4 100644 --- a/Source/Application/Kysect.Shreks.Application.Handlers/Github/AddGithubUserAssociationHandler.cs +++ b/Source/Application/Kysect.Shreks.Application.Handlers/Github/AddGithubUserAssociationHandler.cs @@ -26,6 +26,7 @@ public async Task Handle(Command request, CancellationToken cancellati _context.Users.Update(student.User); await _context.SaveChangesAsync(cancellationToken); + return new Response(); } } \ No newline at end of file diff --git a/Source/Application/Kysect.Shreks.Application.Handlers/Github/RemoveGithubUserAssociationHandler.cs b/Source/Application/Kysect.Shreks.Application.Handlers/Github/RemoveGithubUserAssociationHandler.cs index 0d06e15c3..f3b90a369 100644 --- a/Source/Application/Kysect.Shreks.Application.Handlers/Github/RemoveGithubUserAssociationHandler.cs +++ b/Source/Application/Kysect.Shreks.Application.Handlers/Github/RemoveGithubUserAssociationHandler.cs @@ -22,7 +22,8 @@ public async Task Handle(Command request, CancellationToken cancellati GithubUserAssociation githubUserAssociation = student.User.Associations.OfType().Single(); student.User.RemoveAssociation(githubUserAssociation); - _context.Users.Update(student.User); + _context.UserAssociations.Remove(githubUserAssociation); + await _context.SaveChangesAsync(cancellationToken); return new Response();