diff --git a/Project-Unite/Controllers/SkinsController.cs b/Project-Unite/Controllers/SkinsController.cs index 3f8da3c..33fc61e 100644 --- a/Project-Unite/Controllers/SkinsController.cs +++ b/Project-Unite/Controllers/SkinsController.cs @@ -61,6 +61,7 @@ public ActionResult PostSkin(CreateSkinViewModel model) skin.PostedAt = DateTime.Now; skin.FullDescription = model.LongDescription; skin.UserId = User.Identity.GetUserId(); + skin.Keywords = model.Keywords; skin.VersionId = ""; string repoFolder = $"~/Uploads/{ACL.UserNameRaw(skin.UserId)}/SkinFiles"; string screenshotFolder = $"~/Uploads/{ACL.UserNameRaw(skin.UserId)}/Screenshots"; diff --git a/Project-Unite/Models/Skin.cs b/Project-Unite/Models/Skin.cs index b860518..521fc54 100644 --- a/Project-Unite/Models/Skin.cs +++ b/Project-Unite/Models/Skin.cs @@ -17,7 +17,7 @@ public class Skin public string DownloadUrl { get; set; } public string ScreenshotUrl { get; set; } public DateTime PostedAt { get; set; } - + public string Keywords { get; set; } public Like[] Likes { get @@ -57,6 +57,8 @@ public class CreateSkinViewModel [MinLength(5, ErrorMessage = "You need to supply a valuable title.")] public string Title { get; set; } + public string Keywords { get; set; } + [Required] [MaxLength(500, ErrorMessage ="Your short description may not contain more than 500 characters.")] public string ShortDescription { get; set; } diff --git a/Project-Unite/Views/Shared/_Layout.cshtml b/Project-Unite/Views/Shared/_Layout.cshtml index 353b7b3..3a1430d 100644 --- a/Project-Unite/Views/Shared/_Layout.cshtml +++ b/Project-Unite/Views/Shared/_Layout.cshtml @@ -27,7 +27,15 @@ @RenderSection("scripts", required: false) +