add copy page functionality to control panel

This commit is contained in:
sbwalker
2026-02-24 15:35:45 -05:00
parent 458c8534c7
commit 9aad400038
6 changed files with 204 additions and 47 deletions

View File

@@ -71,6 +71,15 @@ namespace Oqtane.Services
/// <param name="pageId"></param>
/// <returns></returns>
Task DeletePageAsync(int pageId);
/// <summary>
/// Copies the modules from one page to another
/// </summary>
/// <param name="fromPageId"></param>
/// <param name="toPageId"></param>
/// <param name="usePagePermissions"></param>
/// <returns></returns>
Task CopyPageAsync(int fromPageId, int toPageId, bool usePagePermissions);
}
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
@@ -129,5 +138,10 @@ namespace Oqtane.Services
{
await DeleteAsync($"{Apiurl}/{pageId}");
}
public async Task CopyPageAsync(int fromPageId, int toPageId, bool usePagePermissions)
{
await PostAsync($"{Apiurl}/{fromPageId}/{toPageId}/{usePagePermissions}");
}
}
}