case 4447

This commit is contained in:
2023-03-28 00:15:13 +00:00
parent f17c2da5ec
commit 5ac7868661

View File

@@ -13,6 +13,7 @@ namespace Sockeye.Api.Controllers
{
[ApiController]
[ApiVersion("8.0")]
[ApiExplorerSettings(IgnoreApi = true)]
[Route("subscription-server-trial-request")]//SUBSCRIPTION SERVER TRIAL REQUEST HANDLER ROUTE
[Produces("application/json")]
public class SubscriptionServerTrialRequestController : ControllerBase
@@ -45,6 +46,8 @@ namespace Sockeye.Api.Controllers
public string Company { get; set; }
[Required]
public string Name { get; set; }
[Required]
public string RValue { get; set; }
}
@@ -63,6 +66,11 @@ namespace Sockeye.Api.Controllers
return BadRequest(ModelState);
}
if (r.RValue != "totallylegit")
{
return BadRequest();
}
//Already a pending request?
if (await ct.SubscriptionServer.Where(z => z.ServerState == ServerState.Requested && z.TrialEmail == r.Email).AnyAsync())
@@ -94,7 +102,7 @@ namespace Sockeye.Api.Controllers
var newObject = new SubscriptionServer();
switch (r.DataCenter)
{
case "SF":
case "SF":
newObject.TimeZone = "America/Los_Angeles";
break;
case "NY":