Add version 1.0.5 and /api/version endpoint

- Added Version, AssemblyVersion, and FileVersion to project file
- Added /api/version endpoint returning version info
- Follows SilverPay versioning pattern

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-27 09:46:13 +01:00
parent e75411dab9
commit 6be1ea8085
2 changed files with 16 additions and 0 deletions

View File

@@ -280,6 +280,19 @@ app.MapHub<LittleShop.Hubs.ActivityHub>("/activityHub");
// Health check endpoint
app.MapHealthChecks("/health");
// Version endpoint
app.MapGet("/api/version", () =>
{
var version = typeof(Program).Assembly.GetName().Version?.ToString() ?? "1.0.0";
var assemblyVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? "1.0.0";
return Results.Ok(new
{
version = assemblyVersion,
environment = builder.Environment.EnvironmentName,
application = "LittleShop"
});
});
// Apply database migrations and seed data
using (var scope = app.Services.CreateScope())
{