Skip to content

Commit 95a73e8

Browse files
committed
fix RESTful convention @klesh
1 parent 094a381 commit 95a73e8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

backend/plugins/pagerduty/impl/impl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func (p PagerDuty) ApiResources() map[string]map[string]plugin.ApiResourceHandle
192192
"GET": api.GetScopeConfig,
193193
"DELETE": api.DeleteScopeConfig,
194194
},
195-
"scope-config/:scopeConfigId/projects": {
195+
"connections/:connectionId/scope-configs/:scopeConfigId/projects": {
196196
"GET": api.GetServicesByScopeConfig,
197197
},
198198
}

config-ui/src/api/scope-config/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ export const update = (plugin: string, connectionId: ID, id: ID, data: any) =>
3838
data,
3939
});
4040

41-
export const check = (plugin: string, id: ID): Promise<ICheck> =>
42-
request(`/plugins/${plugin}/scope-config/${id}/projects`);
41+
export const check = (plugin: string, connectionId: ID, id: ID): Promise<ICheck> =>
42+
request(`/plugins/${plugin}/connections/${connectionId}/scope-configs/${id}/projects`);

config-ui/src/plugins/components/scope-config/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const ScopeConfig = ({
7171
const handleHideDialog = () => setType(undefined);
7272

7373
const handleCheckScopeConfig = async (id: ID) => {
74-
const [success, res] = await operator(() => API.scopeConfig.check(plugin, id), { hideToast: true });
74+
const [success, res] = await operator(() => API.scopeConfig.check(plugin, connectionId, id), { hideToast: true });
7575

7676
if (success) {
7777
const projects = (res.projects ?? []).map((it: any) => ({
@@ -189,7 +189,7 @@ export const ScopeConfig = ({
189189
const handleUpdate = async (trId: ID) => {
190190
handleHideDialog();
191191

192-
const [success, res] = await operator(() => API.scopeConfig.check(plugin, trId), { hideToast: true });
192+
const [success, res] = await operator(() => API.scopeConfig.check(plugin, connectionId, trId), { hideToast: true });
193193

194194
if (success) {
195195
handleShowProjectsModal(res.projects ?? []);

0 commit comments

Comments
 (0)