mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
UseSwagger
This commit is contained in:
@@ -104,10 +104,11 @@ var app = builder.Build();
|
|||||||
if (app.Environment.IsDevelopment())
|
if (app.Environment.IsDevelopment())
|
||||||
{
|
{
|
||||||
//app.MapOpenApi();
|
//app.MapOpenApi();
|
||||||
app.UseSwagger();
|
|
||||||
app.UseSwaggerUI();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.UseSwagger();
|
||||||
|
app.UseSwaggerUI();
|
||||||
|
|
||||||
app.UseCors("AllowFrontend");
|
app.UseCors("AllowFrontend");
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace Govor.ConsoleClient
|
|||||||
class Program
|
class Program
|
||||||
{
|
{
|
||||||
static string? AuthToken = null;
|
static string? AuthToken = null;
|
||||||
static HttpClientService HttpService = new("http://5.129.212.144:5041"); // поменяй URL на свой
|
static HttpClientService HttpService = new("https://govor-team-govor-88b3.twc1.net"); // поменяй URL на свой
|
||||||
private static FriendsClient friendsClient;
|
private static FriendsClient friendsClient;
|
||||||
static Dictionary<string, List<string>> ChatHistory = new();
|
static Dictionary<string, List<string>> ChatHistory = new();
|
||||||
static string CurrentChatUser = null;
|
static string CurrentChatUser = null;
|
||||||
@@ -67,7 +67,7 @@ namespace Govor.ConsoleClient
|
|||||||
{
|
{
|
||||||
AuthToken = await HttpService.LoginAsync(loginUsername, loginPassword);
|
AuthToken = await HttpService.LoginAsync(loginUsername, loginPassword);
|
||||||
HttpClient sharedClient = new();
|
HttpClient sharedClient = new();
|
||||||
sharedClient.BaseAddress = new Uri("http://5.129.212.144:5041");
|
sharedClient.BaseAddress = new Uri("https://govor-team-govor-88b3.twc1.net");
|
||||||
sharedClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AuthToken);
|
sharedClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AuthToken);
|
||||||
|
|
||||||
friendsClient = new FriendsClient(sharedClient);
|
friendsClient = new FriendsClient(sharedClient);
|
||||||
@@ -92,7 +92,7 @@ namespace Govor.ConsoleClient
|
|||||||
{
|
{
|
||||||
AuthToken = await HttpService.RegisterAsync(regUsername, regPassword, inviteCode);
|
AuthToken = await HttpService.RegisterAsync(regUsername, regPassword, inviteCode);
|
||||||
HttpClient sharedClient = new();
|
HttpClient sharedClient = new();
|
||||||
sharedClient.BaseAddress = new Uri("http://5.129.212.144:5041");
|
sharedClient.BaseAddress = new Uri("https://govor-team-govor-88b3.twc1.net");
|
||||||
sharedClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AuthToken);
|
sharedClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AuthToken);
|
||||||
|
|
||||||
friendsClient = new FriendsClient(sharedClient);
|
friendsClient = new FriendsClient(sharedClient);
|
||||||
|
|||||||
Reference in New Issue
Block a user