fix: 0-pad Published properties
This commit is contained in:
parent
d6c24d80c1
commit
9d46d6495e
|
@ -1,4 +1,4 @@
|
||||||
using Humanizer;
|
using Humanizer;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Primitives;
|
using Microsoft.Extensions.Primitives;
|
||||||
using OliverBooth.Data.Blog;
|
using OliverBooth.Data.Blog;
|
||||||
|
@ -50,9 +50,9 @@ public sealed class BlogApiController : ControllerBase
|
||||||
url = Url.Page("/Blog/Article",
|
url = Url.Page("/Blog/Article",
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
year = post.Published.Year,
|
year = post.Published.ToString("yyyy"),
|
||||||
month = post.Published.Month,
|
month = post.Published.ToString("MM"),
|
||||||
day = post.Published.Day,
|
day = post.Published.ToString("dd"),
|
||||||
slug = post.Slug
|
slug = post.Slug
|
||||||
})
|
})
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in New Issue