Changes on packages
This commit is contained in:
@@ -20,7 +20,7 @@ namespace Musify.Application.Users
|
||||
.Select(u => UserApplicationResponse.FromEntity(u))
|
||||
.SingleOrDefaultAsync(cancellationToken);
|
||||
|
||||
if (user is null)
|
||||
if (user == null)
|
||||
return Error.NotFound();
|
||||
|
||||
return user;
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Musify.Application.Users
|
||||
})
|
||||
.SingleOrDefaultAsync(cancellationToken);
|
||||
|
||||
if (user is null)
|
||||
if (user == null)
|
||||
return Error.NotFound();
|
||||
|
||||
var followersCount = await database.UserFollows
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Musify.Application.Users
|
||||
var user = await database.Users
|
||||
.SingleOrDefaultAsync(u => u.Id == request.Id, cancellationToken);
|
||||
|
||||
if (user is null)
|
||||
if (user == null)
|
||||
{
|
||||
await database.Users.AddAsync(new User
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Musify.Application.Users
|
||||
var follow = await database.UserFollows
|
||||
.SingleOrDefaultAsync(f => f.FollowerId == request.FollowerId && f.FollowedId == request.FollowedId, cancellationToken);
|
||||
|
||||
if (follow is null)
|
||||
if (follow == null)
|
||||
return new Success();
|
||||
|
||||
database.UserFollows.Remove(follow);
|
||||
|
||||
Reference in New Issue
Block a user