From 5b93282b780f4bfa7f100222f413c6046471aba1 Mon Sep 17 00:00:00 2001 From: Drewster727 Date: Sat, 26 Mar 2016 12:06:52 -0500 Subject: [PATCH] show the movie/show title when requesting. --- PlexRequests.UI/Content/search.js | 2 +- PlexRequests.UI/Modules/SearchModule.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PlexRequests.UI/Content/search.js b/PlexRequests.UI/Content/search.js index 62ed6843b..cea4eca66 100644 --- a/PlexRequests.UI/Content/search.js +++ b/PlexRequests.UI/Content/search.js @@ -91,7 +91,7 @@ function sendRequestAjax(data, type, url, buttonId) { success: function (response) { console.log(response); if (response.result === true) { - generateNotify("Success!", "success"); + generateNotify(response.message || "Success!", "success"); $('#' + buttonId).html(" Requested"); $('#' + buttonId).removeClass("btn-primary-outline"); diff --git a/PlexRequests.UI/Modules/SearchModule.cs b/PlexRequests.UI/Modules/SearchModule.cs index 1a77c6247..3370725e5 100644 --- a/PlexRequests.UI/Modules/SearchModule.cs +++ b/PlexRequests.UI/Modules/SearchModule.cs @@ -282,7 +282,7 @@ namespace PlexRequests.UI.Modules var notificationModel = new NotificationModel { Title = model.Title, User = model.RequestedBy, DateTime = DateTime.Now, NotificationType = NotificationType.NewRequest }; NotificationService.Publish(notificationModel); - return Response.AsJson(new JsonResponseModel { Result = true }); + return Response.AsJson(new JsonResponseModel { Result = true, Message = $"{model.Title} was successfully added!" }); } catch (Exception e) { @@ -408,7 +408,7 @@ namespace PlexRequests.UI.Modules var notificationModel = new NotificationModel { Title = model.Title, User = model.RequestedBy, DateTime = DateTime.Now, NotificationType = NotificationType.NewRequest }; NotificationService.Publish(notificationModel); - return Response.AsJson(new { Result = true }); + return Response.AsJson(new JsonResponseModel { Result = true, Message = $"{model.Title} was successfully added!" }); } private bool CheckIfTitleExistsInPlex(string title, string year)