fixed tests and adding new sessions when it not needed

This commit is contained in:
Artemy
2026-02-22 19:34:43 +07:00
parent b1eff9c696
commit aa4c4a0685
8 changed files with 48 additions and 28 deletions
@@ -70,7 +70,6 @@ public class ProfileController : ControllerBase
var mediaInfo = await _mediaService.UploadMediaAsync(media);
await _profileService.SetNewIcon(userId, mediaInfo.MediaId);
var iconId = mediaInfo.MediaId;
return Ok(mediaInfo);
}
+9
View File
@@ -3,6 +3,7 @@ using Govor.API.Common.Extensions;
using Govor.API.Hubs;
using Govor.Application.Services.Authentication;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Mvc;
using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models;
@@ -13,7 +14,12 @@ var services = builder.Services;
builder.AddLogger();// Serilog
#if DEBUG
builder.Configuration.AddJsonFile("appsettings.Development.json", optional: false, reloadOnChange: true);
#else
builder.Configuration.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
#endif
builder.Services.AddCors(options =>
{
@@ -125,6 +131,9 @@ app.UseAuthorization();
app.MapControllers();
app.Map("/server/ping",
() => new OkResult());
app.MapHub<ChatsHub>("/hubs/chats");
app.MapHub<FriendsHub>("/hubs/friends");
app.MapHub<ProfileHub>("/hubs/profiles");
+1 -1
View File
@@ -5,7 +5,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "http://0.0.0.0:8080;",
"applicationUrl": "http://0.0.0.0:8080;http://localhost:7155",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
+15
View File
@@ -4,5 +4,20 @@
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"GovorDbContext": "Host=localhost;Port=5432;Database=GovorDb;Username=postgres;Password=stalcker;"
},
"UseMySql": false,
"AllowedHosts": "*",
"JwtAccessOption": {
"SecretKey": "Q89eY7zP7C4+TqLmHF4kw9xkF1E8Ru4Zpg+up9wFt9g=",
"Minutes": 10
},
"JwtRefreshOption": {
"RefreshTokenLifetimeDays": 30
},
"EncryptionOption": {
"Secret": "8B2j9kkw9xP5m7nQwE2zY3A-=Q8zP7C4+TqLZpg"
}
}