Skip to content

Commit a3bd13f

Browse files
committed
Revert whitespace diffs
1 parent 29b8185 commit a3bd13f

1 file changed

Lines changed: 31 additions & 32 deletions

File tree

API/Controller/Public/PublicShareController.cs

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,41 @@ public async Task<IActionResult> GetPublicShare([FromRoute] Guid publicShareId)
2727
var publicShare = await _db.PublicShares
2828
.Where(x => x.Id == publicShareId && x.Owner.UserDeactivation != null)
2929
.Select(x => new
30+
{
31+
Author = new BasicUserInfo
3032
{
31-
Author = new BasicUserInfo
32-
{
33-
Id = x.Owner.Id,
34-
Name = x.Owner.Name,
35-
Image = x.Owner.GetImageUrl()
36-
},
37-
x.Id,
38-
x.Name,
39-
x.ExpiresAt,
40-
x.CreatedAt,
41-
Shockers = x.ShockerMappings.Select(y => new
33+
Id = x.Owner.Id,
34+
Name = x.Owner.Name,
35+
Image = x.Owner.GetImageUrl()
36+
},
37+
x.Id,
38+
x.Name,
39+
x.ExpiresAt,
40+
x.CreatedAt,
41+
Shockers = x.ShockerMappings.Select(y => new
42+
{
43+
DeviceId = y.Shocker.Device.Id,
44+
DeviceName = y.Shocker.Device.Name,
45+
Shocker = new PublicShareShocker
4246
{
43-
DeviceId = y.Shocker.Device.Id,
44-
DeviceName = y.Shocker.Device.Name,
45-
Shocker = new PublicShareShocker
47+
Id = y.Shocker.Id,
48+
Name = y.Shocker.Name,
49+
Limits = new ShockerLimits
50+
{
51+
Intensity = y.MaxIntensity,
52+
Duration = y.MaxDuration
53+
},
54+
Permissions = new ShockerPermissions
4655
{
47-
Id = y.Shocker.Id,
48-
Name = y.Shocker.Name,
49-
Limits = new ShockerLimits
50-
{
51-
Intensity = y.MaxIntensity,
52-
Duration = y.MaxDuration
53-
},
54-
Permissions = new ShockerPermissions
55-
{
56-
Vibrate = y.AllowVibrate,
57-
Sound = y.AllowSound,
58-
Shock = y.AllowShock,
59-
Live = y.AllowLiveControl
60-
},
61-
Paused = PublicShareUtils.GetPausedReason(y.IsPaused, y.Shocker.IsPaused),
62-
}
63-
})
56+
Vibrate = y.AllowVibrate,
57+
Sound = y.AllowSound,
58+
Shock = y.AllowShock,
59+
Live = y.AllowLiveControl
60+
},
61+
Paused = PublicShareUtils.GetPausedReason(y.IsPaused, y.Shocker.IsPaused),
62+
}
6463
})
65-
.FirstOrDefaultAsync();
64+
}).FirstOrDefaultAsync();
6665

6766
if (publicShare is null) return Problem(PublicShareError.PublicShareNotFound);
6867

0 commit comments

Comments
 (0)