From d6909c674dea8130384ecbb5f7c49d7ac2e06fe7 Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Fri, 2 Sep 2022 21:23:47 +0800 Subject: [PATCH] fix: assignables notifications route --- apps/vue/src/api/messages/notifications.ts | 7 +++++-- .../ocelot.Development.json | 12 +++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/apps/vue/src/api/messages/notifications.ts b/apps/vue/src/api/messages/notifications.ts index 6bab1c12f..74a95060d 100644 --- a/apps/vue/src/api/messages/notifications.ts +++ b/apps/vue/src/api/messages/notifications.ts @@ -10,12 +10,15 @@ import { format } from '/@/utils/strings'; enum Api { GetById = '/api/my-notifilers/{id}', GetList = '/api/my-notifilers', - GetAssignableNotifiers = '/api/my-notifilers/assignables', + GetAssignableNotifiers = '/api/notifilers/assignables', Read = '/api/my-notifilers/{id}/read', MarkReadState = '/api/my-notifilers/mark-read-state', } -export const markReadState = (ids: string[], state: NotificationReadState = NotificationReadState.Read) => { +export const markReadState = ( + ids: string[], + state: NotificationReadState = NotificationReadState.Read, +) => { return defHttp.put({ url: Api.MarkReadState, data: { diff --git a/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.Development.json b/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.Development.json index 52fece402..2b329698a 100644 --- a/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.Development.json +++ b/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.Development.json @@ -1320,7 +1320,7 @@ "Key": "my-subscribes" }, { - "DownstreamPathTemplate": "/api/my-notifilers/assignables", + "DownstreamPathTemplate": "/api/notifilers/{everything}", "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { @@ -1328,9 +1328,10 @@ "Port": 30020 } ], - "UpstreamPathTemplate": "/api/my-notifilers/assignables", + "UpstreamPathTemplate": "/api/notifilers/{everything}", "UpstreamHttpMethod": [ - "GET" + "GET", + "POST" ], "LoadBalancerOptions": { "Type": "RoundRobin" @@ -1349,9 +1350,7 @@ }, "HttpHandlerOptions": { "UseTracing": true - }, - "Priority": 99, - "Key": "assignables-notifilers" + } }, { "DownstreamPathTemplate": "/api/my-notifilers", @@ -2062,7 +2061,6 @@ }, { "RouteKeys": [ - "assignables-notifilers", "my-subscribes" ], "UpstreamPathTemplate": "/api/my-subscribes/assignables-notifilers",