Tweak GetTemplate return

This commit is contained in:
2023-01-16 18:32:25 +00:00
parent 23d16dd676
commit 83feedb59e

View File

@@ -20,9 +20,7 @@ public class ImageGenerationController : BaseController<ImageGenerationControlle
[ProducesResponseType(typeof(IEnumerable<ImageGenerationEndpointRead>), StatusCodes.Status200OK)] [ProducesResponseType(typeof(IEnumerable<ImageGenerationEndpointRead>), StatusCodes.Status200OK)]
public Task<object> GetTemplates() public Task<object> GetTemplates()
{ {
string serialized = JsonSerializer.Serialize(ImageManager.GetGenerationEndpoints()); return Task.FromResult(HttpContext.Send(EventResult.FromSuccess(ImageManager.GetGenerationEndpoints())));
return Task.FromResult(HttpContext.Send(EventResult.FromSuccess(serialized)));
} }
[HttpGet("{template}")] [HttpGet("{template}")]