From 8524ee95f576617df9263e54e2b352eb20eecb92 Mon Sep 17 00:00:00 2001 From: Jamie Date: Fri, 1 Jun 2018 16:08:05 +0100 Subject: [PATCH] Fixed where the test button wouldn't work on the mobile notifications page --- src/Ombi/ClientApp/app/interfaces/IUser.ts | 1 + .../ClientApp/app/settings/notifications/mobile.component.html | 2 +- .../ClientApp/app/settings/notifications/mobile.component.ts | 2 +- src/Ombi/Controllers/MobileController.cs | 1 + src/Ombi/Models/MobileUsersViewModel.cs | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Ombi/ClientApp/app/interfaces/IUser.ts b/src/Ombi/ClientApp/app/interfaces/IUser.ts index 69bc49d0f..bab851420 100644 --- a/src/Ombi/ClientApp/app/interfaces/IUser.ts +++ b/src/Ombi/ClientApp/app/interfaces/IUser.ts @@ -47,6 +47,7 @@ export interface IResetPasswordToken { export interface IMobileUsersViewModel { username: string; + userId: string; devices: number; } diff --git a/src/Ombi/ClientApp/app/settings/notifications/mobile.component.html b/src/Ombi/ClientApp/app/settings/notifications/mobile.component.html index 3aad31ff8..5c82e03d5 100644 --- a/src/Ombi/ClientApp/app/settings/notifications/mobile.component.html +++ b/src/Ombi/ClientApp/app/settings/notifications/mobile.component.html @@ -39,7 +39,7 @@
diff --git a/src/Ombi/ClientApp/app/settings/notifications/mobile.component.ts b/src/Ombi/ClientApp/app/settings/notifications/mobile.component.ts index b40b4aa94..61a0253c8 100644 --- a/src/Ombi/ClientApp/app/settings/notifications/mobile.component.ts +++ b/src/Ombi/ClientApp/app/settings/notifications/mobile.component.ts @@ -34,7 +34,7 @@ export class MobileComponent implements OnInit { this.mobileService.getUserDeviceList().subscribe(x => { if(x.length <= 0) { this.userList = []; - this.userList.push({username:"None",devices:0}); + this.userList.push({username:"None",devices:0, userId:""}); } else { this.userList = x; } diff --git a/src/Ombi/Controllers/MobileController.cs b/src/Ombi/Controllers/MobileController.cs index 95703351c..70a6f1053 100644 --- a/src/Ombi/Controllers/MobileController.cs +++ b/src/Ombi/Controllers/MobileController.cs @@ -68,6 +68,7 @@ namespace Ombi.Controllers { vm.Add(new MobileUsersViewModel { + UserId = u.Id, Username = u.UserAlias, Devices = u.NotificationUserIds.Count }); diff --git a/src/Ombi/Models/MobileUsersViewModel.cs b/src/Ombi/Models/MobileUsersViewModel.cs index e7d99569f..d10ed68bc 100644 --- a/src/Ombi/Models/MobileUsersViewModel.cs +++ b/src/Ombi/Models/MobileUsersViewModel.cs @@ -2,6 +2,7 @@ { public class MobileUsersViewModel { + public string UserId { get; set; } public string Username { get; set; } public int Devices { get; set; } }