From 93db555bb77331c68026135e297606e5eda4fb2f Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 23 Jun 2020 18:20:51 +0000 Subject: [PATCH] --- Controllers/RvfController.cs | 2 +- Controllers/RvlController.cs | 2 +- Controllers/RvrController.cs | 5 +++-- Models/License.cs | 2 +- Models/TrialRequest.cs | 2 +- util/RavenKeyFactory.cs | 7 ++++--- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Controllers/RvfController.cs b/Controllers/RvfController.cs index 7c8d1f8..6c87a98 100644 --- a/Controllers/RvfController.cs +++ b/Controllers/RvfController.cs @@ -23,7 +23,7 @@ namespace rockfishCore.Controllers //### CUSTOMER ROUTE CALLED FROM RAVEN #### [HttpGet("{dbid}")] - public async Task Get([FromRoute] Guid dbid) + public async Task Get([FromRoute] string dbid) { if (!ModelState.IsValid) { diff --git a/Controllers/RvlController.cs b/Controllers/RvlController.cs index c64ad26..020300f 100644 --- a/Controllers/RvlController.cs +++ b/Controllers/RvlController.cs @@ -31,7 +31,7 @@ namespace rockfishCore.Controllers [Required] public string RegisteredTo { get; set; } [Required] - public Guid DbId { get; set; } + public string DbId { get; set; } [Required] public bool LicenseExpires { get; set; } [Required] diff --git a/Controllers/RvrController.cs b/Controllers/RvrController.cs index a015e40..68c9224 100644 --- a/Controllers/RvrController.cs +++ b/Controllers/RvrController.cs @@ -25,7 +25,7 @@ namespace rockfishCore.Controllers public class dtoRequest { [Required] - public Guid DbId { get; set; } + public string DbId { get; set; } [Required, EmailAddress] public string Email { get; set; } [Required] @@ -51,7 +51,8 @@ namespace rockfishCore.Controllers return BadRequest(ModelState); } - if (r.DbId == Guid.Empty) + // if (r.DbId == Guid.Empty) + if(string.IsNullOrWhiteSpace(r.DbId)) { return BadRequest("E1000 - DBId invalid"); } diff --git a/Models/License.cs b/Models/License.cs index ea4c84b..589856b 100644 --- a/Models/License.cs +++ b/Models/License.cs @@ -20,7 +20,7 @@ namespace rockfishCore.Models public string FetchFrom { get; set; } public long? DtFetched { get; set; } public bool Fetched { get; set; } - public Guid DbId { get; set; } + public string DbId { get; set; } public long DtLicenseExpiration { get; set; } public long DtMaintenanceExpiration { get; set; } diff --git a/Models/TrialRequest.cs b/Models/TrialRequest.cs index 83c9db8..de1a1e5 100644 --- a/Models/TrialRequest.cs +++ b/Models/TrialRequest.cs @@ -30,7 +30,7 @@ namespace rockfishCore.Models EmailConfirmCode = "?"; } public long Id { get; set; } - public Guid DbId { get; set; } + public string DbId { get; set; } public string CompanyName { get; set; } public string ContactName { get; set; } public string Notes { get; set; } diff --git a/util/RavenKeyFactory.cs b/util/RavenKeyFactory.cs index cb0a211..63f1e08 100644 --- a/util/RavenKeyFactory.cs +++ b/util/RavenKeyFactory.cs @@ -215,7 +215,7 @@ Plugins: public string LicenseFormat { get; set; } public string Id { get; set; } public string RegisteredTo { get; set; } - public Guid DbId { get; set; } + public string DbId { get; set; } public DateTime LicenseExpiration { get; set; } public DateTime MaintenanceExpiration { get; set; } public List Features { get; set; } @@ -264,7 +264,7 @@ Plugins: - public static string GetRavenTrialKey(Guid dbid, string CompanyName) + public static string GetRavenTrialKey(string dbid, string CompanyName) { //Build a sample test key, sign it and return it @@ -309,7 +309,8 @@ Plugins: if (string.IsNullOrWhiteSpace(k.RegisteredTo)) throw new ArgumentException("RegisteredTo is required", "RegisteredTo"); - if (k.DbId == Guid.Empty) + // if (k.DbId == Guid.Empty) + if (string.IsNullOrWhiteSpace(k.DbId)) throw new ArgumentException("DBId is required", "RegisteredTo"); try