diff --git a/Teknik/Areas/Blog/Views/Blog/Post.cshtml b/Teknik/Areas/Blog/Views/Blog/Post.cshtml index fcb793a..648b125 100644 --- a/Teknik/Areas/Blog/Views/Blog/Post.cshtml +++ b/Teknik/Areas/Blog/Views/Blog/Post.cshtml @@ -7,7 +7,13 @@

@Html.Markdown(@Model.Title)

- Posted on by @Model.Blog.User.Username + Posted on + @if (!Model.System) + { + + by @Model.Blog.User.Username + + } @if (Model.Blog.User.Username == User.Identity.Name || User.IsInRole("Admin")) {
diff --git a/Teknik/Areas/Home/Views/Home/Index.cshtml b/Teknik/Areas/Home/Views/Home/Index.cshtml index 78972e8..00a351a 100644 --- a/Teknik/Areas/Home/Views/Home/Index.cshtml +++ b/Teknik/Areas/Home/Views/Home/Index.cshtml @@ -151,7 +151,7 @@ @post.Title

- Posted on by @post.Blog.User.Username + Posted on

diff --git a/Teknik/Areas/Profile/Controllers/ProfileController.cs b/Teknik/Areas/Profile/Controllers/ProfileController.cs index 9cf0358..c32b4d6 100644 --- a/Teknik/Areas/Profile/Controllers/ProfileController.cs +++ b/Teknik/Areas/Profile/Controllers/ProfileController.cs @@ -227,7 +227,7 @@ namespace Teknik.Areas.Profile.Controllers // Add gogs user using (var client = new WebClient()) { - var obj = new { username = model.Username, email = email, password = model.Password }; + var obj = new { source_id = Config.GitConfig.SourceId, username = model.Username, email = email, password = model.Password }; string json = Newtonsoft.Json.JsonConvert.SerializeObject(obj); client.Headers[HttpRequestHeader.ContentType] = "application/json"; Uri baseUri = new Uri(Config.GitConfig.Host); @@ -305,7 +305,7 @@ namespace Teknik.Areas.Profile.Controllers { using (var client = new WebClient()) { - var obj = new { source_id = 1, email = email, password = newPass }; + var obj = new { source_id = Config.GitConfig.SourceId, email = email, password = newPass }; string json = Newtonsoft.Json.JsonConvert.SerializeObject(obj); client.Headers[HttpRequestHeader.ContentType] = "application/json"; Uri baseUri = new Uri(Config.GitConfig.Host); diff --git a/Teknik/Configuration/GitConfig.cs b/Teknik/Configuration/GitConfig.cs index 06dd548..b409f01 100644 --- a/Teknik/Configuration/GitConfig.cs +++ b/Teknik/Configuration/GitConfig.cs @@ -14,11 +14,14 @@ namespace Teknik.Configuration public string AccessToken { get; set; } + public int SourceId { get; set; } + public GitConfig() { Enabled = true; Host = string.Empty; AccessToken = string.Empty; + SourceId = 1; } } }