From 848577d58bf185b14ac77398a34450bd0368cf2e Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 16 Jun 2022 22:20:36 +0000 Subject: [PATCH] --- .vscode/launch.json | 2 +- server/AyaNova/Controllers/IntegrationController.cs | 4 ++++ server/AyaNova/biz/IntegrationBiz.cs | 6 ++++++ server/AyaNova/models/IntegrationLog.cs | 2 +- server/AyaNova/util/AySchema.cs | 2 +- 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 2c3525c1..7c905164 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -48,7 +48,7 @@ "AYANOVA_DATA_PATH": "c:\\temp\\ravendata", "AYANOVA_USE_URLS": "http://*:7575;", //"AYANOVA_PERMANENTLY_ERASE_DATABASE":"true", - "AYANOVA_SERVER_TEST_MODE": "false", + "AYANOVA_SERVER_TEST_MODE": "true", "AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-8", //"AYANOVA_REPORT_RENDERING_TIMEOUT":"1", "AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small", diff --git a/server/AyaNova/Controllers/IntegrationController.cs b/server/AyaNova/Controllers/IntegrationController.cs index dac5b6ea..ac0f9a90 100644 --- a/server/AyaNova/Controllers/IntegrationController.cs +++ b/server/AyaNova/Controllers/IntegrationController.cs @@ -18,6 +18,10 @@ namespace AyaNova.Api.Controllers [Authorize] public class IntegrationController : ControllerBase { + /* + todo: needs routes for logging and fetching log to view, also mapping collection stuff perhaps?? + + */ private readonly AyContext ct; private readonly ILogger log; private readonly ApiServerState serverState; diff --git a/server/AyaNova/biz/IntegrationBiz.cs b/server/AyaNova/biz/IntegrationBiz.cs index e1753c72..1f8bd9f0 100644 --- a/server/AyaNova/biz/IntegrationBiz.cs +++ b/server/AyaNova/biz/IntegrationBiz.cs @@ -9,6 +9,12 @@ namespace AyaNova.Biz { internal class IntegrationBiz : BizObject { + + + /* + todo: needs code to back routes for logging and fetching log to view + + */ internal IntegrationBiz(AyContext dbcontext, long currentUserId, long userTranslationId, AuthorizationRoles UserRoles) { ct = dbcontext; diff --git a/server/AyaNova/models/IntegrationLog.cs b/server/AyaNova/models/IntegrationLog.cs index ff0baf51..2312df8a 100644 --- a/server/AyaNova/models/IntegrationLog.cs +++ b/server/AyaNova/models/IntegrationLog.cs @@ -11,7 +11,7 @@ namespace AyaNova.Models { public long Id { get; set; } [Required] - public Guid IntegrationAppId { get; set; } + public long IntegrationId { get; set; } [Required] public DateTime Created { get; set; } [Required] diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index 6364e7a3..4f233f45 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -1343,7 +1343,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); + ")"); //INTEGRATIONLOG - await ExecQueryAsync("CREATE TABLE aintegrationlog (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, integrationappid uuid NOT NULL, created TIMESTAMPTZ NOT NULL, statustext TEXT NOT NULL)"); + await ExecQueryAsync("CREATE TABLE aintegrationlog (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, integrationid BIGINT NOT NULL REFERENCES aintegration ON DELETE CASCADE, created TIMESTAMPTZ NOT NULL, statustext TEXT NOT NULL)"); //Trans keys must come in a subsequent schema update when get to front end UI code