版本信息日期处理

parent a6229f6a
......@@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using Performance.DtoModels;
using Performance.Services;
using System.Linq;
namespace Performance.Api.Controllers
{
......@@ -21,7 +22,13 @@ public CommonController(CommonService service)
public ApiResponse Version()
{
var versions = _service.GetVersions();
return new ApiResponse(ResponseType.OK, versions);
return new ApiResponse(ResponseType.OK, versions.Select(w => new
{
w.Id,
w.VersionCode,
PublishTime = w.PublishTime.ToString("yyyyy-MM-dd"),
w.Content,
}));
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment