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:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user