Test WPF Desktop App with Caliburn And RestSharp
This commit is contained in:
@@ -38,26 +38,4 @@ namespace LaDOSE.Api.Controllers
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[Produces("application/json")]
|
||||
[Route("api/[controller]")]
|
||||
public class UtilController : Controller
|
||||
{
|
||||
private IUtilService _service;
|
||||
|
||||
public UtilController(IUtilService service)
|
||||
{
|
||||
_service = service;
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpGet("UpdateBooking")]
|
||||
public bool UpdateBooking()
|
||||
{
|
||||
return _service.UpdateBooking();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
28
LaDOSE.Src/LaDOSE.Api/Controllers/UtilController.cs
Normal file
28
LaDOSE.Src/LaDOSE.Api/Controllers/UtilController.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using LaDOSE.Business.Interface;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LaDOSE.Api.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
[Produces("application/json")]
|
||||
[Route("api/[controller]")]
|
||||
public class UtilController : Controller
|
||||
{
|
||||
private IUtilService _service;
|
||||
|
||||
public UtilController(IUtilService service)
|
||||
{
|
||||
_service = service;
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpGet("UpdateBooking")]
|
||||
public bool UpdateBooking()
|
||||
{
|
||||
return _service.UpdateBooking();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
30
LaDOSE.Src/LaDOSE.Api/Controllers/WordPressController.cs
Normal file
30
LaDOSE.Src/LaDOSE.Api/Controllers/WordPressController.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
using LaDOSE.Business.Interface;
|
||||
using LaDOSE.Entity.Wordpress;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LaDOSE.Api.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
[Produces("application/json")]
|
||||
[Route("api/[controller]")]
|
||||
public class WordPressController : Controller
|
||||
{
|
||||
// GET
|
||||
|
||||
public WordPressController(IWordPressService service)
|
||||
{
|
||||
_service = service;
|
||||
}
|
||||
|
||||
private IWordPressService _service;
|
||||
|
||||
[HttpGet("WPEvent")]
|
||||
public List<WPEvent> Event()
|
||||
{
|
||||
return _service.GetWpEvent();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,6 +100,7 @@ namespace LaDOSE.Api
|
||||
services.AddScoped<IEventService, EventService>();
|
||||
services.AddScoped<ISeasonService, SeasonService>();
|
||||
services.AddScoped<IUtilService, UtilService>();
|
||||
services.AddScoped<IWordPressService, WordPressService>();
|
||||
services.AddTransient<IChallongeProvider>(p => new ChallongeProvider(this.Configuration["ApiKey:ChallongeApiKey"]));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user