From a3d5485c1daceff0c9dfe76d255d1b448c2abde3 Mon Sep 17 00:00:00 2001 From: Matt Kilgore Date: Fri, 4 Oct 2024 13:49:36 -0400 Subject: [PATCH] fix: #147 notifier now shows previous input value --- backend/app/api/static/docs/docs.go | 4 ++++ backend/app/api/static/docs/swagger.json | 4 ++++ backend/app/api/static/docs/swagger.yaml | 3 +++ backend/internal/data/repo/repo_notifier.go | 2 +- docs/docs/api/openapi-2.0.json | 4 ++++ frontend/lib/api/types/data-contracts.ts | 2 ++ frontend/pages/profile.vue | 2 +- 7 files changed, 19 insertions(+), 2 deletions(-) diff --git a/backend/app/api/static/docs/docs.go b/backend/app/api/static/docs/docs.go index e72b0e569..b5fa2dcb2 100644 --- a/backend/app/api/static/docs/docs.go +++ b/backend/app/api/static/docs/docs.go @@ -2762,6 +2762,10 @@ const docTemplate = `{ "updatedAt": { "type": "string" }, + "url": { + "description": "URL field is not exposed to the client", + "type": "string" + }, "userId": { "type": "string" } diff --git a/backend/app/api/static/docs/swagger.json b/backend/app/api/static/docs/swagger.json index 4601140ab..12e556ceb 100644 --- a/backend/app/api/static/docs/swagger.json +++ b/backend/app/api/static/docs/swagger.json @@ -2755,6 +2755,10 @@ "updatedAt": { "type": "string" }, + "url": { + "description": "URL field is not exposed to the client", + "type": "string" + }, "userId": { "type": "string" } diff --git a/backend/app/api/static/docs/swagger.yaml b/backend/app/api/static/docs/swagger.yaml index 6c2d52226..e663b6a64 100644 --- a/backend/app/api/static/docs/swagger.yaml +++ b/backend/app/api/static/docs/swagger.yaml @@ -539,6 +539,9 @@ definitions: type: string updatedAt: type: string + url: + description: URL field is not exposed to the client + type: string userId: type: string type: object diff --git a/backend/internal/data/repo/repo_notifier.go b/backend/internal/data/repo/repo_notifier.go index 8313bc69c..867271b78 100644 --- a/backend/internal/data/repo/repo_notifier.go +++ b/backend/internal/data/repo/repo_notifier.go @@ -55,7 +55,7 @@ type ( Name string `json:"name"` IsActive bool `json:"isActive"` - URL string `json:"-"` // URL field is not exposed to the client + URL string `json:"url"` } ) diff --git a/docs/docs/api/openapi-2.0.json b/docs/docs/api/openapi-2.0.json index 4601140ab..12e556ceb 100644 --- a/docs/docs/api/openapi-2.0.json +++ b/docs/docs/api/openapi-2.0.json @@ -2755,6 +2755,10 @@ "updatedAt": { "type": "string" }, + "url": { + "description": "URL field is not exposed to the client", + "type": "string" + }, "userId": { "type": "string" } diff --git a/frontend/lib/api/types/data-contracts.ts b/frontend/lib/api/types/data-contracts.ts index 62c1286fb..f56ffae1a 100644 --- a/frontend/lib/api/types/data-contracts.ts +++ b/frontend/lib/api/types/data-contracts.ts @@ -323,6 +323,8 @@ export interface NotifierOut { isActive: boolean; name: string; updatedAt: Date | string; + /** URL field is not exposed to the client */ + url: string; userId: string; } diff --git a/frontend/pages/profile.vue b/frontend/pages/profile.vue index 8d91a493e..0fe287394 100644 --- a/frontend/pages/profile.vue +++ b/frontend/pages/profile.vue @@ -208,7 +208,7 @@ targetID.value = v.id; notifier.value = { name: v.name, - url: "", + url: v.url, isActive: v.isActive, }; } else {