Skip to content

Commit 55ff4f9

Browse files
committed
Fix checking for existing shocker share
1 parent c1f58ed commit 55ff4f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

API/Controller/Shares/LinkShareCode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ [FromServices] IDeviceUpdateService deviceUpdateService
3838
}).FirstOrDefaultAsync();
3939
if (shareCode == null) return Problem(ShareCodeError.ShareCodeNotFound);
4040
if (shareCode.Owner == CurrentUser.Id) return Problem(ShareCodeError.CantLinkOwnShareCode);
41-
if (await _db.ShockerShares.AnyAsync(x => x.ShockerId == shareCodeId && x.SharedWith == CurrentUser.Id))
41+
if (await _db.ShockerShares.AnyAsync(x => x.ShockerId == shareCode.Share.ShockerId && x.SharedWith == CurrentUser.Id))
4242
return Problem(ShareCodeError.ShockerAlreadyLinked);
4343

4444
_db.ShockerShares.Add(new ShockerShare

0 commit comments

Comments
 (0)