GetUpdateJsonExcutor.cs 751 B

12345678910111213141516171819202122232425
  1. using LJProxy.LJLib.Net.SPI.Server;
  2. using LJProxy.Models;
  3. using LJProxy.Services;
  4. using Microsoft.AspNetCore.Mvc;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace LJProxy.Excutor
  11. {
  12. public class GetUpdateJsonExcutor : ExcutorBase<GetUpdateJsonRequest>
  13. {
  14. VersionService _service = new VersionService();
  15. protected override IActionResult ExcuteInternal(GetUpdateJsonRequest request, object state)
  16. {
  17. string updateJson = _service.GetUpdateJson();
  18. var result = new ContentResult();
  19. result.Content = updateJson;
  20. result.ContentType = "application/json";
  21. return result;
  22. }
  23. }
  24. }