add tg bot project

This commit is contained in:
2026-04-19 12:38:06 +03:00
parent 4ffd3433f9
commit 985d7e0afa
8 changed files with 61 additions and 2 deletions
+5 -1
View File
@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.6"/>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.6" />
</ItemGroup>
<ItemGroup>
@@ -17,4 +17,8 @@
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GymLogAI.TgBot\GymLogAI.TgBot.csproj" />
</ItemGroup>
</Project>
+4 -1
View File
@@ -1,3 +1,5 @@
using GymLogAI.TgBot;
namespace GymLogAI.API;
public class Program
@@ -8,6 +10,7 @@ public class Program
// Add services to the container.
builder.Services.AddAuthorization();
builder.Services.AddTgBot(builder.Configuration);
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
builder.Services.AddOpenApi();
@@ -45,4 +48,4 @@ public class Program
app.Run();
}
}
}
@@ -4,5 +4,8 @@
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"TelegramBot": {
"BotToken": ""
}
}
+3
View File
@@ -5,5 +5,8 @@
"Microsoft.AspNetCore": "Warning"
}
},
"TelegramBot": {
"BotToken": ""
},
"AllowedHosts": "*"
}