aboutsummaryrefslogtreecommitdiff
path: root/src/Web
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-02-15 21:50:36 +0200
committertranstrike <transtrike@gmail.com>2021-02-15 21:50:36 +0200
commitebf488fd51a2d1a83c124c380b9a1a98d62f42a2 (patch)
tree6d410c4dd5bba288ed86db0e86ef7d83d5fbb686 /src/Web
parent4c03712af14c37718b7be5b23fcadeb86f2a2191 (diff)
downloadDevHive-ebf488fd51a2d1a83c124c380b9a1a98d62f42a2.tar
DevHive-ebf488fd51a2d1a83c124c380b9a1a98d62f42a2.tar.gz
DevHive-ebf488fd51a2d1a83c124c380b9a1a98d62f42a2.zip
Fixed formatting; Adjusted warnings; Adjusted variable names
Diffstat (limited to 'src/Web')
-rw-r--r--src/Web/DevHive.Web.Tests/CommentController.Tests.cs2
-rw-r--r--src/Web/DevHive.Web.Tests/UserController.Tests.cs1
-rw-r--r--src/Web/DevHive.Web/Configurations/Extensions/ConfigureJwt.cs2
-rw-r--r--src/Web/DevHive.Web/Program.cs48
4 files changed, 25 insertions, 28 deletions
diff --git a/src/Web/DevHive.Web.Tests/CommentController.Tests.cs b/src/Web/DevHive.Web.Tests/CommentController.Tests.cs
index 98397e7..7860f3c 100644
--- a/src/Web/DevHive.Web.Tests/CommentController.Tests.cs
+++ b/src/Web/DevHive.Web.Tests/CommentController.Tests.cs
@@ -66,7 +66,6 @@ namespace DevHive.Web.Tests
[Test]
public void AddComment_ReturnsBadRequestObjectResult_WhenCommentIsNotCreatedSuccessfully()
{
- Guid id = Guid.NewGuid();
CreateCommentWebModel createCommentWebModel = new()
{
Message = MESSAGE
@@ -113,7 +112,6 @@ namespace DevHive.Web.Tests
public void GetById_ReturnsTheComment_WhenItExists()
{
Guid id = Guid.NewGuid();
-
ReadCommentServiceModel readCommentServiceModel = new()
{
Message = MESSAGE
diff --git a/src/Web/DevHive.Web.Tests/UserController.Tests.cs b/src/Web/DevHive.Web.Tests/UserController.Tests.cs
index 13f618e..e12738e 100644
--- a/src/Web/DevHive.Web.Tests/UserController.Tests.cs
+++ b/src/Web/DevHive.Web.Tests/UserController.Tests.cs
@@ -32,7 +32,6 @@ namespace DevHive.Web.Tests
[Test]
public void LoginUser_ReturnsOkObjectResult_WhenUserIsSuccessfullyLoggedIn()
{
- Guid id = Guid.NewGuid();
LoginWebModel loginWebModel = new()
{
UserName = USERNAME
diff --git a/src/Web/DevHive.Web/Configurations/Extensions/ConfigureJwt.cs b/src/Web/DevHive.Web/Configurations/Extensions/ConfigureJwt.cs
index 03d4b11..8d387bd 100644
--- a/src/Web/DevHive.Web/Configurations/Extensions/ConfigureJwt.cs
+++ b/src/Web/DevHive.Web/Configurations/Extensions/ConfigureJwt.cs
@@ -35,7 +35,6 @@ namespace DevHive.Web.Configurations.Extensions
{
OnTokenValidated = context =>
{
- // TODO: add more authentication
return Task.CompletedTask;
}
};
@@ -43,7 +42,6 @@ namespace DevHive.Web.Configurations.Extensions
x.SaveToken = true;
x.TokenValidationParameters = new TokenValidationParameters
{
- //ValidateIssuerSigningKey = false,
IssuerSigningKey = new SymmetricSecurityKey(key),
ValidateIssuer = false,
ValidateAudience = false
diff --git a/src/Web/DevHive.Web/Program.cs b/src/Web/DevHive.Web/Program.cs
index 6982da9..fdb6889 100644
--- a/src/Web/DevHive.Web/Program.cs
+++ b/src/Web/DevHive.Web/Program.cs
@@ -1,23 +1,25 @@
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.Extensions.Hosting;
-
-namespace DevHive.Web
-{
- public class Program
- {
- private const int HTTP_PORT = 5000;
-
- public static void Main(string[] args)
- {
- CreateHostBuilder(args).Build().Run();
- }
-
- public static IHostBuilder CreateHostBuilder(string[] args) =>
- Host.CreateDefaultBuilder(args)
- .ConfigureWebHostDefaults(webBuilder =>
- {
- webBuilder.ConfigureKestrel(opt => opt.ListenLocalhost(HTTP_PORT));
- webBuilder.UseStartup<Startup>();
- });
- }
-}
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Hosting;
+
+namespace DevHive.Web
+{
+ #pragma warning disable IDE0055, S1118
+
+ public class Program
+ {
+ private const int HTTP_PORT = 5000;
+
+ public static void Main(string[] args)
+ {
+ CreateHostBuilder(args).Build().Run();
+ }
+
+ public static IHostBuilder CreateHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .ConfigureWebHostDefaults(webBuilder =>
+ {
+ webBuilder.ConfigureKestrel(opt => opt.ListenLocalhost(HTTP_PORT));
+ webBuilder.UseStartup<Startup>();
+ });
+ }
+}