Skip to content
Snippets Groups Projects

Fix: Changed json (coscine/issues#1274)

3 files
+ 33
4
Compare changes
  • Side-by-side
  • Inline

Files

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