using FlatRender.ContentSvc.Application.Services; using FlatRender.ContentSvc.Models.Requests; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace FlatRender.ContentSvc.Controllers; /// Duplicate a project to another aspect ratio (same scene/element structure, new size). [ApiController] [Route("v1/projects")] public class ProjectDuplicateController(TemplateService svc) : ControllerBase { [Authorize(Roles = "Admin")] [HttpPost("{id:guid}/duplicate")] public async Task Duplicate(Guid id, [FromBody] DuplicateProjectRequest req) => Ok(await svc.DuplicateProjectAsync(id, req ?? new DuplicateProjectRequest(null, null, null, null, null, null))); }