Add missing handler stubs
This commit is contained in:
parent
b5b1bf8dfb
commit
b970119f07
25
TaikoLocalServer/Controllers/AddTokenCountController.cs
Normal file
25
TaikoLocalServer/Controllers/AddTokenCountController.cs
Normal file
@ -0,0 +1,25 @@
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/addtokencount.php")]
|
||||
[ApiController]
|
||||
public class AddTokenCountController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<AddTokenCountController> logger;
|
||||
public AddTokenCountController(ILogger<AddTokenCountController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult AddTokenCount([FromBody] AddTokenCountRequest request)
|
||||
{
|
||||
logger.LogInformation("AddTokenCount request : {Request}", request.Stringify());
|
||||
|
||||
var response = new AddTokenCountResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
@ -1,8 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Swan.Formatters;
|
||||
using taiko.game;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("/v12r03/chassis/baidcheck.php")]
|
||||
@ -20,10 +16,18 @@ public class BaidController:ControllerBase
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult InitialDataCheck([FromBody] BAIDRequest request)
|
||||
{
|
||||
logger.LogInformation("Heartbeat request: {Request}", request.Stringify());
|
||||
var response = new BAIDResponse()
|
||||
logger.LogInformation("Baid request: {Request}", request.Stringify());
|
||||
var response = new BAIDResponse
|
||||
{
|
||||
Result = 0
|
||||
Result = 1,
|
||||
ComSvrResult = 1,
|
||||
IsPublish = true,
|
||||
AccessCode = request.AccessCode,
|
||||
Accesstoken = "123456",
|
||||
RegCountryId = "JPN",
|
||||
Baid = 1,
|
||||
MbId = 1,
|
||||
PlayerType = 2
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
|
@ -1,8 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Swan.Formatters;
|
||||
using taiko.game;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("/v12r03/chassis/bookkeeping.php")]
|
||||
|
@ -0,0 +1,28 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/challengecompe.php")]
|
||||
[ApiController]
|
||||
public class ChallengeCompetitionController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<ChallengeCompetitionController> logger;
|
||||
public ChallengeCompetitionController(ILogger<ChallengeCompetitionController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult HandleChallenge([FromBody] ChallengeCompeRequest request)
|
||||
{
|
||||
logger.LogInformation("ChallengeCompe request : {Request}", request.Stringify());
|
||||
|
||||
var response = new ChallengeCompeResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
|
||||
}
|
||||
}
|
27
TaikoLocalServer/Controllers/CrownsDataController.cs
Normal file
27
TaikoLocalServer/Controllers/CrownsDataController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/crownsdata.php")]
|
||||
[ApiController]
|
||||
public class CrownsDataController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<CrownsDataController> logger;
|
||||
public CrownsDataController(ILogger<CrownsDataController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult CrownsData([FromBody] CrownsDataRequest request)
|
||||
{
|
||||
logger.LogInformation("CrownsData request : {Request}", request.Stringify());
|
||||
|
||||
var response = new CrownsDataResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
28
TaikoLocalServer/Controllers/ExecuteQrCodeController.cs
Normal file
28
TaikoLocalServer/Controllers/ExecuteQrCodeController.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/executeqrcode.php")]
|
||||
[ApiController]
|
||||
public class ExecuteQrCodeController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<ExecuteQrCodeController> logger;
|
||||
public ExecuteQrCodeController(ILogger<ExecuteQrCodeController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult ExecuteQrCode([FromBody] ExecuteQrcodeRequest request)
|
||||
{
|
||||
logger.LogInformation("ExecuteQrcode request : {Request}", request.Stringify());
|
||||
|
||||
var response = new ExecuteQrcodeResponse
|
||||
{
|
||||
QrcodeId = 1,
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
27
TaikoLocalServer/Controllers/GetAiDataController.cs
Normal file
27
TaikoLocalServer/Controllers/GetAiDataController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getaidata.php")]
|
||||
[ApiController]
|
||||
public class GetAiDataController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<GetAiDataController> logger;
|
||||
public GetAiDataController(ILogger<GetAiDataController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult GetAiData([FromBody] GetAiDataRequest request)
|
||||
{
|
||||
logger.LogInformation("GetAiData request : {Request}", request.Stringify());
|
||||
|
||||
var response = new GetAiDataResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
27
TaikoLocalServer/Controllers/GetAiScoreController.cs
Normal file
27
TaikoLocalServer/Controllers/GetAiScoreController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getaiscore.php")]
|
||||
[ApiController]
|
||||
public class GetAiScoreController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<GetAiScoreController> logger;
|
||||
public GetAiScoreController(ILogger<GetAiScoreController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult GetAiScore([FromBody] GetAiScoreRequest request)
|
||||
{
|
||||
logger.LogInformation("request : {Request}", request.Stringify());
|
||||
|
||||
var response = new GetAiScoreResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
30
TaikoLocalServer/Controllers/GetApplicationUrlController.cs
Normal file
30
TaikoLocalServer/Controllers/GetApplicationUrlController.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getapplicationurl.php")]
|
||||
[ApiController]
|
||||
public class GetApplicationUrlController : ControllerBase
|
||||
{
|
||||
private const string ApplicationUrl = "vsapi.taiko-p.jp";
|
||||
|
||||
private readonly ILogger<GetApplicationUrlController> logger;
|
||||
public GetApplicationUrlController(ILogger<GetApplicationUrlController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult GetApplicationUrl([FromBody] GetApplicationUrlRequest request)
|
||||
{
|
||||
logger.LogInformation("request : {Request}", request.Stringify());
|
||||
|
||||
var response = new GetApplicationUrlResponse
|
||||
{
|
||||
Result = 1,
|
||||
ApplicationUrl = ApplicationUrl
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
27
TaikoLocalServer/Controllers/GetDanOdaiController.cs
Normal file
27
TaikoLocalServer/Controllers/GetDanOdaiController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getdanodai.php")]
|
||||
[ApiController]
|
||||
public class GetDanOdaiController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<GetDanOdaiController> logger;
|
||||
public GetDanOdaiController(ILogger<GetDanOdaiController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult GetDanOdai([FromBody] GetDanOdaiRequest request)
|
||||
{
|
||||
logger.LogInformation("GetDanOdai request : {Request}", request.Stringify());
|
||||
|
||||
var response = new GetDanOdaiResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
27
TaikoLocalServer/Controllers/GetDanScoreController.cs
Normal file
27
TaikoLocalServer/Controllers/GetDanScoreController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class GetDanScoreController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<GetDanScoreController> logger;
|
||||
public GetDanScoreController(ILogger<GetDanScoreController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult GetDanScore([FromBody] GetDanScoreRequest request)
|
||||
{
|
||||
logger.LogInformation("GetDanScore request : {Request}", request.Stringify());
|
||||
|
||||
var response = new GetDanScoreResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
27
TaikoLocalServer/Controllers/GetFolderController.cs
Normal file
27
TaikoLocalServer/Controllers/GetFolderController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getfolder.php")]
|
||||
[ApiController]
|
||||
public class GetFolderController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<GetFolderController> logger;
|
||||
public GetFolderController(ILogger<GetFolderController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult GetFolder([FromBody] GetfolderRequest request)
|
||||
{
|
||||
logger.LogInformation("GetFolderController request : {Request}", request.Stringify());
|
||||
|
||||
var response = new GetfolderResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
26
TaikoLocalServer/Controllers/GetScoreRankController.cs
Normal file
26
TaikoLocalServer/Controllers/GetScoreRankController.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getscorerank.php")]
|
||||
[ApiController]
|
||||
public class GetScoreRankController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<GetScoreRankController> logger;
|
||||
public GetScoreRankController(ILogger<GetScoreRankController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult GetScoreRank([FromBody] GetScoreRankRequest request)
|
||||
{
|
||||
logger.LogInformation("GetScoreRankController request : {Request}", request.Stringify());
|
||||
var response = new GetScoreRankResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
27
TaikoLocalServer/Controllers/GetShopFolderController.cs
Normal file
27
TaikoLocalServer/Controllers/GetShopFolderController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getshopfolder.php")]
|
||||
[ApiController]
|
||||
public class GetShopFolderController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<GetShopFolderController> logger;
|
||||
public GetShopFolderController(ILogger<GetShopFolderController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult GetShopFolder([FromBody] GetShopFolderRequest request)
|
||||
{
|
||||
logger.LogInformation("GetShopFolderController request : {Request}", request.Stringify());
|
||||
|
||||
var response = new GetShopFolderResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getsongintroduction.php")]
|
||||
[ApiController]
|
||||
public class GetSongIntroductionController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<GetSongIntroductionController> logger;
|
||||
public GetSongIntroductionController(ILogger<GetSongIntroductionController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult GetSongIntroduction([FromBody] GetSongIntroductionRequest request)
|
||||
{
|
||||
logger.LogInformation("GetSongIntroductionController request : {Request}", request.Stringify());
|
||||
|
||||
var response = new GetSongIntroductionResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
27
TaikoLocalServer/Controllers/GetTelopController.cs
Normal file
27
TaikoLocalServer/Controllers/GetTelopController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/gettelop.php")]
|
||||
[ApiController]
|
||||
public class GetTelopController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<GetTelopController> logger;
|
||||
public GetTelopController(ILogger<GetTelopController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult GetTelop([FromBody] GettelopRequest request)
|
||||
{
|
||||
logger.LogInformation("GetTelopController request : {Request}", request.Stringify());
|
||||
|
||||
var response = new GettelopResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
27
TaikoLocalServer/Controllers/GetTokenCountController.cs
Normal file
27
TaikoLocalServer/Controllers/GetTokenCountController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/gettokencount.php")]
|
||||
[ApiController]
|
||||
public class GetTokenCountController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<GetTokenCountController> logger;
|
||||
public GetTokenCountController(ILogger<GetTokenCountController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult GetTokenCount([FromBody] GetTokenCountRequest request)
|
||||
{
|
||||
logger.LogInformation("GetTokenCountController request : {Request}", request.Stringify());
|
||||
|
||||
var response = new GetTokenCountResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
@ -1,8 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Swan.Formatters;
|
||||
using taiko.game;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("/v12r03/chassis/heartbeat.php")]
|
||||
|
@ -1,7 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Swan.Formatters;
|
||||
using taiko.game;
|
||||
using taiko.vsinterface;
|
||||
using taiko.vsinterface;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
@ -22,10 +19,12 @@ public class InitialDataCheckController:ControllerBase
|
||||
public IActionResult InitialDataCheck([FromBody] InitialdatacheckRequest request)
|
||||
{
|
||||
logger.LogInformation("Heartbeat request: {Request}", request.Stringify());
|
||||
var response = new InitialdatacheckResponse()
|
||||
var response = new InitialdatacheckResponse
|
||||
{
|
||||
Result = 1,
|
||||
IsDanplay = true
|
||||
IsDanplay = true,
|
||||
IsAibattle = true,
|
||||
IsClose = false
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
|
27
TaikoLocalServer/Controllers/MyDonEntryController.cs
Normal file
27
TaikoLocalServer/Controllers/MyDonEntryController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/mydonentry.php")]
|
||||
[ApiController]
|
||||
public class MyDonEntryController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<MyDonEntryController> logger;
|
||||
public MyDonEntryController(ILogger<MyDonEntryController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult GetMyDonEntry([FromBody] MydonEntryRequest request)
|
||||
{
|
||||
logger.LogInformation("MyDonEntryController request : {Request}", request.Stringify());
|
||||
|
||||
var response = new MydonEntryResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
32
TaikoLocalServer/Controllers/PlayResultController.cs
Normal file
32
TaikoLocalServer/Controllers/PlayResultController.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using ProtoBuf;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/playresult.php")]
|
||||
[ApiController]
|
||||
public class PlayResultController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<PlayResultController> logger;
|
||||
public PlayResultController(ILogger<PlayResultController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult UploadPlayResult([FromBody] PlayResultRequest request)
|
||||
{
|
||||
logger.LogInformation("PlayResultController request : {Request}", request.Stringify());
|
||||
|
||||
var playResultData = Serializer.Deserialize<PlayResultDataRequest>(new ReadOnlyMemory<byte>(request.PlayresultData));
|
||||
|
||||
logger.LogInformation("Play result data {Data}", playResultData.Stringify());
|
||||
|
||||
var response = new PlayResultResponse()
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
27
TaikoLocalServer/Controllers/RewardItemController.cs
Normal file
27
TaikoLocalServer/Controllers/RewardItemController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/rewarditem.php")]
|
||||
[ApiController]
|
||||
public class RewardItemController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<RewardItemController> logger;
|
||||
public RewardItemController(ILogger<RewardItemController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult RewardItem([FromBody] RewardItemRequest request)
|
||||
{
|
||||
logger.LogInformation("RewardItemController request : {Request}", request.Stringify());
|
||||
|
||||
var response = new RewardItemResponse
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
27
TaikoLocalServer/Controllers/SelfBestController.cs
Normal file
27
TaikoLocalServer/Controllers/SelfBestController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/selfbest.php")]
|
||||
[ApiController]
|
||||
public class SelfBestController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<SelfBestController> logger;
|
||||
public SelfBestController(ILogger<SelfBestController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult SelfBest([FromBody] SelfBestRequest request)
|
||||
{
|
||||
logger.LogInformation("SelfBestController request : {Request}", request.Stringify());
|
||||
|
||||
var response = new SelfBestResponse()
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
27
TaikoLocalServer/Controllers/SongPurchaseController.cs
Normal file
27
TaikoLocalServer/Controllers/SongPurchaseController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/songpurchase.php")]
|
||||
[ApiController]
|
||||
public class SongPurchaseController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<SongPurchaseController> logger;
|
||||
public SongPurchaseController(ILogger<SongPurchaseController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult SongPurchase([FromBody] SongPurchaseRequest request)
|
||||
{
|
||||
logger.LogInformation("SongPurchaseController request : {Request}", request.Stringify());
|
||||
|
||||
var response = new SongPurchaseResponse()
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Swan.Formatters;
|
||||
using taiko.vsinterface;
|
||||
using taiko.vsinterface;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
|
27
TaikoLocalServer/Controllers/TournamentCheckController.cs
Normal file
27
TaikoLocalServer/Controllers/TournamentCheckController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/tournamentcheck.php")]
|
||||
[ApiController]
|
||||
public class TournamentCheckController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<TournamentCheckController> logger;
|
||||
public TournamentCheckController(ILogger<TournamentCheckController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult TournamentCheck([FromBody] TournamentcheckRequest request)
|
||||
{
|
||||
logger.LogInformation("TournamentCheckController request : {Request}", request.Stringify());
|
||||
|
||||
var response = new TournamentcheckResponse()
|
||||
{
|
||||
Result = 1,
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
27
TaikoLocalServer/Controllers/UserDataController.cs
Normal file
27
TaikoLocalServer/Controllers/UserDataController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/userdata.php")]
|
||||
[ApiController]
|
||||
public class UserDataController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<UserDataController> logger;
|
||||
public UserDataController(ILogger<UserDataController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult GetUserData([FromBody] UserDataRequest request)
|
||||
{
|
||||
logger.LogInformation("UserDataController request : {Request}", request.Stringify());
|
||||
|
||||
var response = new UserDataResponse()
|
||||
{
|
||||
Result = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
28
TaikoLocalServer/Controllers/VerifyQrCodeController.cs
Normal file
28
TaikoLocalServer/Controllers/VerifyQrCodeController.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/verifyqrcode.php")]
|
||||
[ApiController]
|
||||
public class VerifyQrCodeController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<VerifyQrCodeController> logger;
|
||||
public VerifyQrCodeController(ILogger<VerifyQrCodeController> logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/protobuf")]
|
||||
public IActionResult VerifyQrCode([FromBody] VerifyQrcodeRequest request)
|
||||
{
|
||||
logger.LogInformation("VerifyQrCodeController request : {Request}", request.Stringify());
|
||||
|
||||
var response = new VerifyQrcodeResponse
|
||||
{
|
||||
Result = 1,
|
||||
QrcodeId = 1
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
4
TaikoLocalServer/GlobalUsings.cs
Normal file
4
TaikoLocalServer/GlobalUsings.cs
Normal file
@ -0,0 +1,4 @@
|
||||
// Global using directives
|
||||
global using Microsoft.AspNetCore.Mvc;
|
||||
global using Swan.Formatters;
|
||||
global using taiko.game;
|
File diff suppressed because it is too large
Load Diff
@ -18,9 +18,7 @@ builder.Services.AddControllers().AddProtoBufNet();
|
||||
builder.Services.AddHttpLogging(options =>
|
||||
{
|
||||
options.LoggingFields = HttpLoggingFields.RequestPropertiesAndHeaders |
|
||||
HttpLoggingFields.ResponsePropertiesAndHeaders |
|
||||
HttpLoggingFields.RequestBody;
|
||||
options.RequestHeaders.Add("Pragma");
|
||||
HttpLoggingFields.ResponsePropertiesAndHeaders;
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
|
@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
@ -6,6 +6,10 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Templates\TemplateController.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="protobuf-net" Version="3.1.17" />
|
||||
<PackageReference Include="protobuf-net.AspNetCore" Version="3.1.17" />
|
||||
|
Loading…
Reference in New Issue
Block a user