mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
wiredup db logging.
This commit is contained in:
parent
1016edb05b
commit
af4063c3e2
6 changed files with 31 additions and 6 deletions
|
@ -16,11 +16,17 @@ namespace NzbDrone.Api.Extensions
|
|||
}
|
||||
|
||||
public static T FromJson<T>(this Stream body, Type type)
|
||||
{
|
||||
return (T)FromJson(body, type);
|
||||
}
|
||||
|
||||
|
||||
public static object FromJson(this Stream body, Type type)
|
||||
{
|
||||
var reader = new StreamReader(body, true);
|
||||
body.Position = 0;
|
||||
var value = reader.ReadToEnd();
|
||||
return (T)Json.Deserialize(value, type);
|
||||
return Json.Deserialize(value, type);
|
||||
}
|
||||
|
||||
public static JsonResponse<TModel> AsResponse<TModel>(this TModel model, HttpStatusCode statusCode = HttpStatusCode.OK)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue