diff --git a/zero.Core/Api/SpacesApi.cs b/zero.Core/Api/SpacesApi.cs
index 9dcbeb53..4298fce9 100644
--- a/zero.Core/Api/SpacesApi.cs
+++ b/zero.Core/Api/SpacesApi.cs
@@ -73,6 +73,29 @@ namespace zero.Core.Api
}
+ ///
+ public async Task> GetItems(params string[] ids) where T : SpaceContent
+ {
+ Space space = GetBy();
+
+ using (IAsyncDocumentSession session = Store.OpenAsyncSession())
+ {
+ ids = ids.Distinct().ToArray();
+
+ Dictionary models = await session.LoadAsync(ids);
+ Dictionary result = new Dictionary();
+
+ foreach (string id in ids)
+ {
+ models.TryGetValue(id, out T model);
+ result.Add(id, model);
+ }
+
+ return result;
+ }
+ }
+
+
///
public async Task> GetListByQuery(string alias, ListQuery query)
{
@@ -158,6 +181,11 @@ namespace zero.Core.Api
///
Task GetItem(string id = null) where T : SpaceContent;
+ ///
+ /// Get editor items for a space
+ ///
+ Task> GetItems(params string[] ids) where T : SpaceContent;
+
///
/// Get all list items for a space (with query)
///
diff --git a/zero.Web/Controllers/SpacesController.cs b/zero.Web/Controllers/SpacesController.cs
index b12ef485..cd0b5a41 100644
--- a/zero.Web/Controllers/SpacesController.cs
+++ b/zero.Web/Controllers/SpacesController.cs
@@ -45,7 +45,6 @@ namespace zero.Web.Controllers
return Ok(await Api.GetListByQuery(alias, query));
}
-
public async Task GetContent([FromQuery] string alias, [FromQuery] string contentId = null)
{
if (!CanReadSpace(alias))