mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 11:44:56 +00:00
fixed tests and adding new sessions when it not needed
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user