changed NotificationQuery user id to string

This commit is contained in:
Luke Pulverenti 2013-07-15 21:33:47 -04:00
parent 40ee886f2e
commit b1576d7faf
3 changed files with 4 additions and 5 deletions

View File

@ -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; }

View File

@ -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; }

View File

@ -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());