diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-07-15 21:33:47 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-07-15 21:33:47 -0400 |
| commit | b1576d7faf1849f11c0fae9d3618359dfc190a18 (patch) | |
| tree | e17acf39f44c0b049f1779ba5a765984d8fa595c | |
| parent | 40ee886f2ed66d93eb0f6464b29c6b1361a13793 (diff) | |
changed NotificationQuery user id to string
3 files changed, 4 insertions, 5 deletions
diff --git a/MediaBrowser.Api/NotificationsService.cs b/MediaBrowser.Api/NotificationsService.cs index 6b39b3c48..2d1ecc231 100644 --- a/MediaBrowser.Api/NotificationsService.cs +++ b/MediaBrowser.Api/NotificationsService.cs @@ -13,7 +13,7 @@ namespace MediaBrowser.Api public 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.cs index a252e2512..7e8814d7a 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.cs index aef8fc03f..f755bd4e6 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()); |
