The Free Software Media System - Server Backend & API
changed NotificationQuery user id to string
Luke Pulverentib1576d7faf18
diff --git a/MediaBrowser.Api/NotificationsService.cs b/MediaBrowser.Api/NotificationsService.csindex 6b39b3c487..2d1ecc2317 100644--- a/MediaBrowser.Api/NotificationsService.cs+++ b/MediaBrowser.Api/NotificationsService.cs@@ -13,7 +13,7 @@ namespace MediaBrowser.Apipublic class GetNotifications : IReturn<NotificationResult>{[ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]- public Guid UserId { get; set; }+ public string UserId { get; set; }[ApiMember(Name = "IsRead", Description = "An optional filter by IsRead", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]public bool? IsRead { get; set; }diff --git a/MediaBrowser.Model/Notifications/NotificationQuery.cs b/MediaBrowser.Model/Notifications/NotificationQuery.csindex a252e25122..7e8814d7a6 100644--- a/MediaBrowser.Model/Notifications/NotificationQuery.cs+++ b/MediaBrowser.Model/Notifications/NotificationQuery.cs@@ -1,10 +1,9 @@-using System;-+namespace MediaBrowser.Model.Notifications{public class NotificationQuery{- public Guid UserId { get; set; }+ public string UserId { get; set; }public bool? IsRead { get; set; }diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteNotificationsRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteNotificationsRepository.csindex aef8fc03fc..f755bd4e61 100644--- a/MediaBrowser.Server.Implementations/Persistence/SqliteNotificationsRepository.cs+++ b/MediaBrowser.Server.Implementations/Persistence/SqliteNotificationsRepository.cs@@ -91,7 +91,7 @@ namespace MediaBrowser.Server.Implementations.Persistence}clauses.Add("UserId=@UserId");- cmd.Parameters.Add(cmd, "@UserId", DbType.Guid).Value = query.UserId;+ cmd.Parameters.Add(cmd, "@UserId", DbType.Guid).Value = new Guid(query.UserId);var whereClause = " where " + string.Join(" And ", clauses.ToArray());