Commit 0baeec35 authored by Marcel Nellesen's avatar Marcel Nellesen
Browse files

Fix: Changed json (coscine/issues#1274)

parent d41c203f
......@@ -140,7 +140,36 @@ namespace Coscine.Api.Tree.Controllers
Kind = x.Key.Substring(x.Key.LastIndexOf(".") + 1),
Provider = resource.Type.DisplayName
};
return new ObjectMetaInfoReturnObject(objectMetaInfo, _blobApiLink, resource.Id.ToString());
var objectMetaInfoReturnObject = new ObjectMetaInfoReturnObject(objectMetaInfo, _blobApiLink, resource.Id.ToString());
var result = new JObject
{
["Name"] = objectMetaInfoReturnObject.Name,
["Path"] = objectMetaInfoReturnObject.Path,
["Size"] = objectMetaInfoReturnObject.Size,
["Kind"] = objectMetaInfoReturnObject.Kind,
["Modified"] = objectMetaInfoReturnObject.Modified,
["Created"] = objectMetaInfoReturnObject.Created,
["Provider"] = objectMetaInfoReturnObject.Provider,
["IsFolder"] = objectMetaInfoReturnObject.IsFolder,
["IsFile"] = objectMetaInfoReturnObject.IsFile,
["Action"] = new JObject {
["Delete"] = new JObject {
["Method"] = "DELETE",
["Url"] = objectMetaInfoReturnObject.DeleteLink
},
["Download"] = new JObject
{
["Method"] = "GET",
["Url"] = objectMetaInfoReturnObject.DownloadLink
},
["Upload"] = new JObject
{
["Method"] = "PUT",
["Url"] = objectMetaInfoReturnObject.UploadLink
}
}
};
return result;
})))
))
);
......
......@@ -80,8 +80,8 @@
<Reference Include="Coscine.ResourceTypeBase, Version=1.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.ResourceTypeBase.1.4.0\lib\net461\Coscine.ResourceTypeBase.dll</HintPath>
</Reference>
<Reference Include="Coscine.WaterbutlerHelper, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.WaterbutlerHelper.1.2.1\lib\net461\Coscine.WaterbutlerHelper.dll</HintPath>
<Reference Include="Coscine.WaterbutlerHelper, Version=1.2.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.WaterbutlerHelper.1.2.2-beta0001\lib\net461\Coscine.WaterbutlerHelper.dll</HintPath>
</Reference>
<Reference Include="dotNetRDF, Version=2.6.0.0, Culture=neutral, PublicKeyToken=6055ffe4c97cc780, processorArchitecture=MSIL">
<HintPath>..\packages\dotNetRDF.2.6.0\lib\net40\dotNetRDF.dll</HintPath>
......
......@@ -10,7 +10,7 @@
<package id="Coscine.ResourceConfiguration" version="1.3.0" targetFramework="net461" />
<package id="Coscine.ResourceLoader" version="1.2.0" targetFramework="net461" />
<package id="Coscine.ResourceTypeBase" version="1.4.0" targetFramework="net461" />
<package id="Coscine.WaterbutlerHelper" version="1.2.1" targetFramework="net461" />
<package id="Coscine.WaterbutlerHelper" version="1.2.2-beta0001" targetFramework="net461" />
<package id="dotNetRDF" version="2.6.0" targetFramework="net461" />
<package id="dotNetRDF.Data.Virtuoso" version="2.6.0" targetFramework="net461" />
<package id="EntityFramework" version="6.4.4" targetFramework="net461" />
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment