Skip to content

Commit 6c759e1

Browse files
Format code
1 parent c5a1756 commit 6c759e1

File tree

9 files changed

+22
-21
lines changed

9 files changed

+22
-21
lines changed

src/Nullinside.Api.Common.AspNetCore/Middleware/BasicAuthorizationHandler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ namespace Nullinside.Api.Common.AspNetCore.Middleware;
55
/// <summary>
66
/// Performs a basic check on the user's roles to ensure the user is in the role required for the endpoint.
77
/// </summary>
8-
public class BasicAuthorizationHandler : AuthorizationHandler<BasicAuthorizationRequirement>, IAuthorizationRequirement {
8+
public class
9+
BasicAuthorizationHandler : AuthorizationHandler<BasicAuthorizationRequirement>, IAuthorizationRequirement {
910
/// <summary>
1011
/// Performs a basic check on the user's roles to ensure the user is in the role required for the endpoint.
1112
/// </summary>

src/Nullinside.Api.Common.AspNetCore/Nullinside.Api.Common.AspNetCore.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2121
<PrivateAssets>all</PrivateAssets>
2222
</PackageReference>
23-
<PackageReference Include="MySql.EntityFrameworkCore" Version="8.0.8" />
24-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.9.0" />
23+
<PackageReference Include="MySql.EntityFrameworkCore" Version="8.0.8"/>
24+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.9.0"/>
2525
</ItemGroup>
2626

2727
<ItemGroup>

src/Nullinside.Api.Common/Docker/DockerProxy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public async Task<bool> TurnOnOffDockerCompose(string name, bool turnOn, Cancell
129129
}
130130

131131
/// <summary>
132-
/// Executes an SSH command in the given directory.
132+
/// Executes an SSH command in the given directory.
133133
/// </summary>
134134
/// <param name="command">The command to execute.</param>
135135
/// <param name="token">The cancellation token.</param>

src/Nullinside.Api.Common/Twitch/ITwitchApiProxy.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public interface ITwitchApiProxy {
3333
Task<TwitchAccessToken?> RefreshAccessToken(CancellationToken token = new());
3434

3535
/// <summary>
36-
/// Determines if the <see cref="OAuth"/> is valid.
36+
/// Determines if the <see cref="OAuth" /> is valid.
3737
/// </summary>
3838
/// <param name="token">The cancellation token.</param>
3939
/// <returns>True if valid, false otherwise.</returns>
@@ -71,7 +71,7 @@ public interface ITwitchApiProxy {
7171
/// <returns>The users with confirmed bans.</returns>
7272
Task<IEnumerable<BannedUser>> BanChannelUsers(string channelId, string botId,
7373
IEnumerable<(string Id, string Username)> users, string reason, CancellationToken token = new());
74-
74+
7575
/// <summary>
7676
/// Gets the list of mods for the channel.
7777
/// </summary>

src/Nullinside.Api.Model/INullinsideContext.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Nullinside.Api.Model;
77

88
/// <summary>
9-
/// Represents the nullinside database.
9+
/// Represents the nullinside database.
1010
/// </summary>
1111
public interface INullinsideContext : IAsyncDisposable {
1212
/// <summary>
@@ -60,20 +60,20 @@ public interface INullinsideContext : IAsyncDisposable {
6060
DatabaseFacade Database { get; }
6161

6262
/// <summary>
63-
/// Saves all changes made in this context to the database.
63+
/// Saves all changes made in this context to the database.
6464
/// </summary>
6565
/// <param name="cancellationToken">A <see cref="CancellationToken" /> to observe while waiting for the task to complete.</param>
6666
/// <returns>
67-
/// A task that represents the asynchronous save operation. The task result contains the
68-
/// number of state entries written to the database.
67+
/// A task that represents the asynchronous save operation. The task result contains the
68+
/// number of state entries written to the database.
6969
/// </returns>
7070
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
71-
71+
7272
/// <summary>
73-
/// Saves all changes made in this context to the database.
73+
/// Saves all changes made in this context to the database.
7474
/// </summary>
7575
/// <returns>
76-
/// The number of state entries written to the database.
76+
/// The number of state entries written to the database.
7777
/// </returns>
7878
int SaveChanges();
7979
}

src/Nullinside.Api.Model/Shared/UserHelpers.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Security.Cryptography;
2-
31
using Microsoft.EntityFrameworkCore;
42

53
using Nullinside.Api.Common;

src/Nullinside.Api/Controllers/TwitchBotController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ public TwitchBotController(IConfiguration configuration, INullinsideContext dbCo
5858
[AllowAnonymous]
5959
[HttpGet]
6060
[Route("login")]
61-
public async Task<IActionResult> TwitchLogin([FromQuery] string code, [FromServices] ITwitchApiProxy api, CancellationToken token) {
61+
public async Task<IActionResult> TwitchLogin([FromQuery] string code, [FromServices] ITwitchApiProxy api,
62+
CancellationToken token) {
6263
string? siteUrl = _configuration.GetValue<string>("Api:SiteUrl");
6364
if (null == await api.CreateAccessToken(code, token)) {
6465
return Redirect($"{siteUrl}/twitch-bot/config?error={TwitchBotLoginErrors.TwitchErrorWithToken}");

src/Nullinside.Api/Controllers/UserController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ public async Task<IActionResult> Login([FromForm] GoogleOpenIdToken creds, Cance
9595
[AllowAnonymous]
9696
[HttpGet]
9797
[Route("twitch-login")]
98-
public async Task<IActionResult> TwitchLogin([FromQuery] string code, [FromServices] ITwitchApiProxy api, CancellationToken token) {
98+
public async Task<IActionResult> TwitchLogin([FromQuery] string code, [FromServices] ITwitchApiProxy api,
99+
CancellationToken token) {
99100
string? siteUrl = _configuration.GetValue<string>("Api:SiteUrl");
100101
if (null == await api.CreateAccessToken(code, token)) {
101102
return Redirect($"{siteUrl}/user/login?error=3");

src/Nullinside.Api/Nullinside.Api.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
</PropertyGroup>
2222

2323
<ItemGroup>
24-
<PackageReference Include="Google.Apis.Oauth2.v2" Version="1.68.0.1869" />
24+
<PackageReference Include="Google.Apis.Oauth2.v2" Version="1.68.0.1869"/>
2525
<PackageReference Include="log4net.Ext.Json" Version="2.0.10.1"/>
2626
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.8">
2727
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2828
<PrivateAssets>all</PrivateAssets>
2929
</PackageReference>
3030
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="8.0.0"/>
31-
<PackageReference Include="MySql.EntityFrameworkCore" Version="8.0.8" />
32-
<PackageReference Include="SSH.NET" Version="2024.1.0" />
33-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.9.0" />
31+
<PackageReference Include="MySql.EntityFrameworkCore" Version="8.0.8"/>
32+
<PackageReference Include="SSH.NET" Version="2024.1.0"/>
33+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.9.0"/>
3434
<PackageReference Include="TwitchLib.Api" Version="3.9.0"/>
3535
</ItemGroup>
3636

0 commit comments

Comments
 (0)