Tweak GetTemplate return

main
exsersewo 2 years ago
parent 23d16dd676
commit 83feedb59e
Signed by: exsersewo
GPG Key ID: 9C6DDF9AC9BA14A0
  1. 4
      src/Controllers/ImageGenerationController.cs

@ -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}")]

Loading…
Cancel
Save