style: format url as yyyy/MM/dd

release/1.0.0
Oliver Booth 2023-08-11 15:43:06 +01:00
parent becd70c865
commit 1a726b4962
Signed by: oliverbooth
GPG Key ID: 725DB725A0D9EE61
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using OliverBooth.Data.Blog;
using OliverBooth.Services;
@ -41,9 +41,9 @@ public class Index : PageModel
var route = new
{
area = "blog",
year = post.Published.Year,
month = post.Published.Month,
day = post.Published.Day,
year = post.Published.ToString("yyyy"),
month = post.Published.ToString("MM"),
day = post.Published.ToString("dd"),
slug = post.Slug
};
return Redirect(Url.Page("/Article", route)!);