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 @@
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; } } }