diff --git a/src/Umbraco.Web/Editors/PackageController.cs b/src/Umbraco.Web/Editors/PackageController.cs new file mode 100644 index 0000000000..e6d84e8288 --- /dev/null +++ b/src/Umbraco.Web/Editors/PackageController.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Web.Http; +using umbraco.cms.businesslogic.packager; +using Umbraco.Web.Mvc; +using Umbraco.Web.WebApi.Filters; + +namespace Umbraco.Web.Editors +{ + /// + /// A controller used for installing packages and managing all of the data in the packages section in the back office + /// + [PluginController("UmbracoApi")] + [UmbracoApplicationAuthorize(Core.Constants.Applications.Packages)] + public class PackageController : UmbracoAuthorizedJsonController + { + [HttpGet] + public List GetCreatedPackages() + { + //TODO: Packager stuff still lives in business logic - YUK + //TODO: Could be too much data down the wire + return CreatedPackage.GetAllCreatedPackages(); + + /* + * "author": "Test", + "files": [], + "iconUrl": "", + "id": 1, + "license": "MIT License", + "licenseUrl": "http://opensource.org/licenses/MIT", + "name": "Test v8", + "url": "https://test.com", + "version": "0.0.0" + */ + + + } + + [HttpGet] + public CreatedPackage GetCreatedPackageById(int id) + { + return CreatedPackage.GetById(id); + } + + } +} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 717c2f508e..5b396c9486 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -111,6 +111,7 @@ +