File tree Expand file tree Collapse file tree 11 files changed +32
-27
lines changed Expand file tree Collapse file tree 11 files changed +32
-27
lines changed Original file line number Diff line number Diff line change 2
2
3
3
<PropertyGroup >
4
4
<TargetFramework >net8.0</TargetFramework >
5
- <Nullable >enable </Nullable >
5
+ <Nullable >disable </Nullable >
6
6
<ImplicitUsings >enable</ImplicitUsings >
7
7
</PropertyGroup >
8
8
12
12
13
13
<ItemGroup >
14
14
<PackageReference Include =" Microsoft.AspNetCore.Authentication.JwtBearer" Version =" 7.0.9" />
15
+ <PackageReference Include =" Microsoft.IdentityModel.JsonWebTokens" Version =" 8.3.0" />
15
16
<PackageReference Include =" Serilog.AspNetCore" Version =" 7.0.0" />
16
17
<PackageReference Include =" Swashbuckle.AspNetCore.Swagger" Version =" 6.5.0" />
17
18
<PackageReference Include =" Swashbuckle.AspNetCore.SwaggerGen" Version =" 6.5.0" />
20
21
<PackageReference Include =" FluentValidation" Version =" 11.6.0" />
21
22
<PackageReference Include =" Dapper.Contrib" Version =" 2.0.78" />
22
23
<PackageReference Include =" Newtonsoft.Json" Version =" 13.0.3" />
24
+ <PackageReference Include =" System.IdentityModel.Tokens.Jwt" Version =" 8.3.0" />
25
+ <PackageReference Include =" System.Text.Json" Version =" 9.0.0" />
23
26
</ItemGroup >
24
27
25
28
</Project >
Original file line number Diff line number Diff line change @@ -17,10 +17,12 @@ public DatabasesController(DB db)
17
17
18
18
[ AllowAnonymous ]
19
19
[ HttpPut ]
20
- public async Task PreparedDB ( )
20
+ public Task PreparedDB ( )
21
21
{
22
22
_db . CleanTables ( ) ;
23
23
_db . CreateTables ( ) ;
24
+
25
+ return Task . CompletedTask ;
24
26
}
25
27
}
26
28
}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public class UsersController : ControllerBase
17
17
private readonly JwtSetings _jwtSetings ;
18
18
private readonly SingUpUserRequestValidator _singUpUserRequestValidator ;
19
19
private readonly LoginUserRequestValidator _loginUserRequestValidator ;
20
-
20
+
21
21
public UsersController
22
22
( UserRepository rep , JwtSetings jwtSetings ,
23
23
SingUpUserRequestValidator singUpUserRequestValidator ,
@@ -87,9 +87,9 @@ public async Task<IResult> Login([FromBody] LoginUserRequest request)
87
87
[ Route ( "logout" ) ]
88
88
[ Authorize ]
89
89
[ HttpPost ]
90
- public async Task < IResult > Logout ( )
90
+ public Task < IResult > Logout ( )
91
91
{
92
- return Results . Ok ( ) ;
92
+ return Task . FromResult ( Results . Ok ( ) ) ;
93
93
}
94
94
}
95
95
}
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ public async Task<DBResultExeption> InsertUser(UserDBRecord record)
94
94
}
95
95
}
96
96
97
- public async Task < UserLoginDBRecord ? > TryFindUserLoginData ( string email )
97
+ public async Task < UserLoginDBRecord > TryFindUserLoginData ( string email )
98
98
{
99
99
try
100
100
{
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ namespace BookstoreSimulator.Pages
8
8
[ IgnoreAntiforgeryToken ]
9
9
public class ErrorModel : PageModel
10
10
{
11
- public string ? RequestId { get ; set ; }
11
+ public string RequestId { get ; set ; }
12
12
13
- public bool ShowRequestId => ! string . IsNullOrEmpty ( RequestId ) ;
13
+ public bool ShowRequestId => string . IsNullOrEmpty ( RequestId ) ;
14
14
15
15
private readonly ILogger < ErrorModel > _logger ;
16
16
@@ -24,4 +24,4 @@ public void OnGet()
24
24
RequestId = Activity . Current ? . Id ?? HttpContext . TraceIdentifier ;
25
25
}
26
26
}
27
- }
27
+ }
Original file line number Diff line number Diff line change @@ -89,11 +89,11 @@ public static void Main(string[] args)
89
89
IssuerSigningKey = new SymmetricSecurityKey ( Encoding . UTF8 . GetBytes ( jwtSetings . Key ) )
90
90
} ;
91
91
} ) ;
92
-
92
+
93
93
var settings = builder . Configuration . GetSection ( "BookstoreSettings" ) . Get < BookstoreSettings > ( ) ;
94
94
95
95
builder . Services . AddSingleton ( _ => new UserRepository ( settings , logger ) ) ;
96
- builder . Services . AddSingleton ( _ => new BookRepository ( settings , logger ) ) ;
96
+ builder . Services . AddSingleton ( _ => new BookRepository ( settings , logger ) ) ;
97
97
builder . Services . AddSingleton ( _ => new OrderRepository ( settings , logger ) ) ;
98
98
builder . Services . AddSingleton ( _ => new DB ( settings , logger ) ) ;
99
99
builder . Services . AddSingleton ( _ => new SingUpUserRequestValidator ( ) ) ;
@@ -115,8 +115,8 @@ public static void Main(string[] args)
115
115
{
116
116
OnPrepareResponse = context =>
117
117
{
118
- context . Context . Response . Headers . Add ( "Cache-Control" , "no-cache, no-store" ) ;
119
- context . Context . Response . Headers . Add ( "Expires" , "-1" ) ;
118
+ context . Context . Response . Headers . Append ( "Cache-Control" , "no-cache, no-store" ) ;
119
+ context . Context . Response . Headers . Append ( "Expires" , "-1" ) ;
120
120
}
121
121
} ) ;
122
122
Original file line number Diff line number Diff line change 67
67
<PackageReference Include =" Dapper.Contrib" Version =" 2.0.78" />
68
68
<PackageReference Include =" LiteDB" Version =" 5.0.15" />
69
69
70
- <PackageReference Include =" NBomber" Version =" 5.8.1 " />
70
+ <PackageReference Include =" NBomber" Version =" 5.8.2 " />
71
71
<PackageReference Include =" NBomber.Data" Version =" 5.0.0" />
72
- <PackageReference Include =" NBomber.Http" Version =" 5.2.0 " />
73
- <PackageReference Include =" NBomber.MQTT" Version =" 0.2.0 " />
74
- <PackageReference Include =" NBomber.Sinks.Timescale" Version =" 0.6.1 " />
75
- <PackageReference Include =" NBomber.WebBrowser" Version =" 0.1.0 " />
72
+ <PackageReference Include =" NBomber.Http" Version =" 5.2.1 " />
73
+ <PackageReference Include =" NBomber.MQTT" Version =" 0.2.1 " />
74
+ <PackageReference Include =" NBomber.Sinks.Timescale" Version =" 0.6.2 " />
75
+ <PackageReference Include =" NBomber.WebBrowser" Version =" 0.1.1 " />
76
76
<PackageReference Include =" NBomber.WebSockets" Version =" 0.1.0" />
77
- <PackageReference Include =" NBomber.Sinks.InfluxDB" Version =" 5.1.0 " />
77
+ <PackageReference Include =" NBomber.Sinks.InfluxDB" Version =" 5.1.1 " />
78
78
79
79
<PackageReference Include =" Serilog.Sinks.Elasticsearch" Version =" 9.0.0" />
80
80
<PackageReference Include =" Serilog.Sinks.Grafana.Loki" Version =" 8.3.0" />
Original file line number Diff line number Diff line change 31
31
// -------------------------------
32
32
// ----- Hello World examples -----
33
33
// -------------------------------
34
- new HelloWorldExample ( ) . Run ( ) ;
34
+ // new HelloWorldExample().Run();
35
35
// new ScenarioWithInit().Run();
36
36
// new ScenarioWithSteps().Run();
37
37
// new StepsShareData().Run();
65
65
// new InfluxDBReportingExample().Run();
66
66
// new TimescaleDBReportingExample().Run();
67
67
// new CustomReportingExample().Run();
68
- // new NBomberStudioReportingExample().Run();
68
+ new NBomberStudioReportingExample ( ) . Run ( ) ;
69
69
70
70
// ---- Logs ----
71
71
// new TextFileLogger().Run();
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ namespace WebAppSimulator.Pages
8
8
[ IgnoreAntiforgeryToken ]
9
9
public class ErrorModel : PageModel
10
10
{
11
- public string ? RequestId { get ; set ; }
11
+ public string RequestId { get ; set ; }
12
12
13
- public bool ShowRequestId => ! string . IsNullOrEmpty ( RequestId ) ;
13
+ public bool ShowRequestId => string . IsNullOrEmpty ( RequestId ) ;
14
14
15
15
private readonly ILogger < ErrorModel > _logger ;
16
16
@@ -24,4 +24,4 @@ public void OnGet()
24
24
RequestId = Activity . Current ? . Id ?? HttpContext . TraceIdentifier ;
25
25
}
26
26
}
27
- }
27
+ }
Original file line number Diff line number Diff line change 2
2
3
3
<PropertyGroup >
4
4
<TargetFramework >net8.0</TargetFramework >
5
- <Nullable >enable </Nullable >
5
+ <Nullable >disable </Nullable >
6
6
<ImplicitUsings >enable</ImplicitUsings >
7
7
</PropertyGroup >
8
8
You can’t perform that action at this time.
0 commit comments