Add nullable support
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using System.Net.Mime;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Prospect.Server.Api.Config;
|
||||
@@ -45,8 +46,8 @@ public class ClientController : Controller
|
||||
|
||||
[AllowAnonymous]
|
||||
[HttpPost("LoginWithSteam")]
|
||||
[Produces("application/json")]
|
||||
public async Task<IActionResult> LoginWithSteam(ClientLoginWithSteamRequest request)
|
||||
[Produces(MediaTypeNames.Application.Json)]
|
||||
public async Task<IActionResult> LoginWithSteam(FLoginWithSteamRequest request)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(request.SteamTicket))
|
||||
{
|
||||
@@ -125,7 +126,7 @@ public class ClientController : Controller
|
||||
}
|
||||
|
||||
[HttpPost("AddGenericID")]
|
||||
[Produces("application/json")]
|
||||
[Produces(MediaTypeNames.Application.Json)]
|
||||
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
|
||||
public IActionResult AddGenericId(FAddGenericIDRequest request)
|
||||
{
|
||||
@@ -138,7 +139,7 @@ public class ClientController : Controller
|
||||
}
|
||||
|
||||
[HttpPost("UpdateUserTitleDisplayName")]
|
||||
[Produces("application/json")]
|
||||
[Produces(MediaTypeNames.Application.Json)]
|
||||
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
|
||||
public IActionResult UpdateUserTitleDisplayName(FUpdateUserTitleDisplayNameRequest request)
|
||||
{
|
||||
@@ -154,7 +155,7 @@ public class ClientController : Controller
|
||||
}
|
||||
|
||||
[HttpPost("UpdateUserData")]
|
||||
[Produces("application/json")]
|
||||
[Produces(MediaTypeNames.Application.Json)]
|
||||
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
|
||||
public async Task<IActionResult> UpdateUserData(FUpdateUserDataRequest request)
|
||||
{
|
||||
@@ -173,7 +174,7 @@ public class ClientController : Controller
|
||||
}
|
||||
|
||||
[HttpPost("GetUserData")]
|
||||
[Produces("application/json")]
|
||||
[Produces(MediaTypeNames.Application.Json)]
|
||||
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
|
||||
public async Task<IActionResult> GetUserData(FGetUserDataRequest request)
|
||||
{
|
||||
@@ -193,7 +194,7 @@ public class ClientController : Controller
|
||||
}
|
||||
|
||||
[HttpPost("GetUserReadOnlyData")]
|
||||
[Produces("application/json")]
|
||||
[Produces(MediaTypeNames.Application.Json)]
|
||||
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
|
||||
public IActionResult GetUserReadOnlyData(FGetUserDataRequest request)
|
||||
{
|
||||
@@ -210,7 +211,7 @@ public class ClientController : Controller
|
||||
}
|
||||
|
||||
[HttpPost("GetUserInventory")]
|
||||
[Produces("application/json")]
|
||||
[Produces(MediaTypeNames.Application.Json)]
|
||||
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
|
||||
public IActionResult GetUserReadOnlyData(FGetUserInventoryRequest request)
|
||||
{
|
||||
@@ -252,7 +253,7 @@ public class ClientController : Controller
|
||||
}
|
||||
|
||||
[HttpPost("GetTitleData")]
|
||||
[Produces("application/json")]
|
||||
[Produces(MediaTypeNames.Application.Json)]
|
||||
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
|
||||
public IActionResult GetTitleData(FGetTitleDataRequest request)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using System.Net.Mime;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Prospect.Server.Api.Models.Client;
|
||||
using Prospect.Server.Api.Models.CloudScript;
|
||||
@@ -21,7 +22,7 @@ public class CloudScriptController : Controller
|
||||
}
|
||||
|
||||
[HttpPost("ExecuteFunction")]
|
||||
[Produces("application/json")]
|
||||
[Produces(MediaTypeNames.Application.Json)]
|
||||
public IActionResult ExecuteFunction(FExecuteFunctionRequest request)
|
||||
{
|
||||
_logger.LogInformation("Executing function {Function}", request.FunctionName);
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
using System.Net.Mime;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Prospect.Server.Api.Models.Client;
|
||||
using Prospect.Server.Api.Models.Multiplayer;
|
||||
using Prospect.Server.Api.Models.Multiplayer.Data;
|
||||
using Prospect.Server.Api.Services.Auth.Entity;
|
||||
using Prospect.Server.Api.Services.Auth.User;
|
||||
|
||||
namespace Prospect.Server.Api.Controllers;
|
||||
|
||||
[Route("MultiplayerServer")]
|
||||
[ApiController]
|
||||
[Authorize(AuthenticationSchemes = EntityAuthenticationOptions.DefaultScheme)]
|
||||
public class MultiplayerController : Controller
|
||||
{
|
||||
private readonly ILogger<MultiplayerController> _logger;
|
||||
|
||||
public MultiplayerController(ILogger<MultiplayerController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
[HttpPost("ListQosServersForTitle")]
|
||||
[Produces(MediaTypeNames.Application.Json)]
|
||||
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
|
||||
public IActionResult ListQosServersForTitle(FListQosServersForTitleRequest request)
|
||||
{
|
||||
return Ok(new ClientResponse<object>
|
||||
{
|
||||
Code = 200,
|
||||
Status = "OK",
|
||||
Data = new FListQosServersForTitleResponse
|
||||
{
|
||||
PageSize = 1,
|
||||
QosServers = new List<FQosServer>
|
||||
{
|
||||
new FQosServer
|
||||
{
|
||||
Region = "NorthEurope",
|
||||
ServerUrl = "127.0.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user