feat(3.2.0) fix: PUT/POST notify-config/ URL错误,

* fix: PUT/POST notify-config/ URL错误, 统一api url末尾不加/, 在函数中拼接 `${url}/${id}`
This commit is contained in:
dhb52 2024-03-19 01:34:57 +00:00 committed by byteblogs168
parent 3f824834b5
commit 80e427e25c
3 changed files with 42 additions and 42 deletions

View File

@ -3,24 +3,24 @@ const jobApi = {
// 任务信息
jobPageList: '/job/page/list',
jobList: '/job/list',
jobDetail: '/job/',
jobDetail: '/job',
saveJob: '/job',
updateJob: '/job',
updateJobStatus: '/job/status',
delJob: '/job/',
delJob: '/job',
timeByCron: '/job/cron',
jobNameList: '/job/job-name/list',
triggerJob: '/job/trigger/',
triggerJob: '/job/trigger',
// 任务批次
jobBatchList: '/job/batch/list',
jobBatchDetail: '/job/batch/',
stop: '/job/batch/stop/',
retry: '/job/batch/retry/',
jobBatchDetail: '/job/batch',
stop: '/job/batch/stop',
retry: '/job/batch/retry',
// 通知
jobNotifyConfigPageList: '/job/notify/config/page/list',
jobNotifyConfigDetail: '/job/notify/config/',
jobNotifyConfigDetail: '/job/notify/config',
saveJobNotify: '/job/notify/config',
updateJobNotify: '/job/notify/config',
@ -36,11 +36,11 @@ const jobApi = {
updateWorkflow: '/workflow',
workflowDetail: '/workflow',
workflowBatchListPage: '/workflow/batch/page/list',
workflowBatchDetail: '/workflow/batch/',
updateStatus: '/workflow/update/status/',
delWorkflow: '/workflow/',
triggerWorkflow: '/workflow/trigger/',
stopWorkflowBatch: '/workflow/batch/stop/',
workflowBatchDetail: '/workflow/batch',
updateStatus: '/workflow/update/status',
delWorkflow: '/workflow',
triggerWorkflow: '/workflow/trigger',
stopWorkflowBatch: '/workflow/batch/stop',
workflowNameList: '/workflow/workflow-name/list'
}
@ -48,7 +48,7 @@ export default jobApi
export function retry (id) {
return request({
url: jobApi.retry + id,
url: `${jobApi.retry}/${id}`,
method: 'post'
})
}
@ -62,35 +62,35 @@ export function workflowNameList (parameter) {
export function stopWorkflowBatch (id) {
return request({
url: jobApi.stopWorkflowBatch + id,
url: `${jobApi.stopWorkflowBatch}/${id}`,
method: 'post'
})
}
export function triggerWorkflow (id) {
return request({
url: jobApi.triggerWorkflow + id,
url: `${jobApi.triggerWorkflow}/${id}`,
method: 'post'
})
}
export function delWorkflow (id) {
return request({
url: jobApi.delWorkflow + id,
url: `${jobApi.delWorkflow}/${id}`,
method: 'delete'
})
}
export function updateWorkflowStatus (id) {
return request({
url: jobApi.updateStatus + id,
url: `${jobApi.updateStatus}/${id}`,
method: 'put'
})
}
export function workflowBatchDetail (id) {
return request({
url: jobApi.workflowBatchDetail + id,
url: `${jobApi.workflowBatchDetail}/${id}`,
method: 'get'
})
}
@ -113,7 +113,7 @@ export function workflowListPage (parameter) {
export function triggerJob (id) {
return request({
url: jobApi.triggerJob + id,
url: `${jobApi.triggerJob}/${id}`,
method: 'post'
})
}
@ -143,7 +143,7 @@ export function timeByCron (parameter) {
export function delJob (id) {
return request({
url: jobApi.delJob + id,
url: `${jobApi.delJob}/${id}`,
method: 'delete'
})
}
@ -182,7 +182,7 @@ export function jobBatchList (parameter) {
export function jobBatchDetail (id) {
return request({
url: jobApi.jobBatchDetail + id,
url: `${jobApi.jobBatchDetail}/${id}`,
method: 'get'
})
}
@ -205,7 +205,7 @@ export function getJobList (parameter) {
export function getJobDetail (id) {
return request({
url: jobApi.jobDetail + id,
url: `${jobApi.jobDetail}/${id}`,
method: 'get'
})
}
@ -235,7 +235,7 @@ export function jobNotifyConfigPageList (parameter) {
}
export function getJobNotifyConfigDetail (id) {
return request({
url: jobApi.jobNotifyConfigDetail + id,
url: `${jobApi.jobNotifyConfigDetail}/${id}`,
method: 'get'
})
}

View File

@ -19,7 +19,7 @@ const api = {
allGroupConfigList: `/group/all/group-config/list`,
onlinePods: `/group/on-line/pods/`,
retryTaskPage: '/retry-task/list',
retryTaskById: '/retry-task/',
retryTaskById: '/retry-task',
saveRetryTask: '/retry-task',
batchSaveRetryTask: '/retry-task/batch',
idempotentIdGenerate: '/retry-task/generate/idempotent-id',
@ -30,19 +30,19 @@ const api = {
manualTriggerCallbackTask: '/retry-task/manual/trigger/callback/task',
retryTaskLogPage: '/retry-task-log/list',
retryTaskLogMessagePage: '/retry-task-log/message/list',
retryTaskLogById: '/retry-task-log/',
retryTaskLogById: '/retry-task-log',
retryDeadLetterPage: '/retry-dead-letter/list',
retryDeadLetterById: '/retry-dead-letter/',
retryDeadLetterById: '/retry-dead-letter',
retryDeadLetterRollback: '/retry-dead-letter/batch/rollback',
deleteRetryDeadLetter: '/retry-dead-letter/batch',
scenePageList: '/scene-config/page/list',
sceneList: '/scene-config/list',
notifyConfigList: '/notify-config/list',
userPageList: '/user/page/list',
delUser: '/user/',
delUser: '/user',
saveUser: '/user',
systemUserByUserName: '/user/username/user-info',
systemUserPermissionByUserId: '/user-permissions/',
systemUserPermissionByUserId: '/user-permissions',
partitionTableList: '/group/partition-table/list',
totalPartition: '/group/partition',
systemVersion: '/system/version',
@ -51,7 +51,7 @@ const api = {
addNamespace: '/namespace',
updateNamespace: '/namespace',
namespaceList: '/namespace/list',
delNamespace: '/namespace/',
delNamespace: '/namespace',
allNamespace: '/namespace/all'
}
@ -81,7 +81,7 @@ export function getAllNamespace () {
export function delNamespace (id) {
return request({
url: api.delNamespace + id,
url: `${api.delNamespace}/${id}`,
method: 'delete'
})
}
@ -112,7 +112,7 @@ export function namespaceList (parameter) {
export function delUser (id) {
return request({
url: api.delUser + id,
url: `${api.delUser}/${id}`,
method: 'delete'
})
}
@ -244,7 +244,7 @@ export function getRetryTaskPage (parameter) {
export function getRetryTaskById (id, parameter) {
return request({
url: api.retryTaskById + id,
url: `${api.retryTaskById}/${id}`,
method: 'get',
params: parameter
})
@ -300,7 +300,7 @@ export function getRetryTaskLogPage (parameter) {
export function getRetryTaskLogById (id) {
return request({
url: api.retryTaskLogById + id,
url: `${api.retryTaskLogById}/${id}`,
method: 'get'
})
}
@ -315,7 +315,7 @@ export function getRetryDeadLetterPage (parameter) {
export function getRetryDeadLetterById (id, parameter) {
return request({
url: api.retryDeadLetterById + id,
url: `${api.retryDeadLetterById}/${id}`,
method: 'get',
params: parameter
})
@ -355,7 +355,7 @@ export function getSystemUserByUserName (parameter) {
export function getSystemUserPermissionByUserId (id) {
return request({
url: api.systemUserPermissionByUserId + id,
url: `${api.systemUserPermissionByUserId}/${id}`,
method: 'get'
})
}
@ -370,7 +370,7 @@ export function getNotifyConfigList (parameter) {
export function getGroupConfigByGroupName (groupName) {
return request({
url: api.groupConfigByGroupName + `/${groupName}`,
url: `${api.groupConfigByGroupName}/${groupName}`,
method: 'get'
})
}

View File

@ -4,15 +4,15 @@ const retryApi = {
// -------------- 场景配置 -------------------
scenePageList: '/scene-config/page/list',
sceneList: '/scene-config/list',
sceneDetail: '/scene-config/',
sceneDetail: '/scene-config',
saveScene: '/scene-config',
updateScene: '/scene-config',
// -------------- 通知配置 -------------------
notifyConfigList: '/notify-config/list',
notifyConfigDetail: '/notify-config/',
saveNotify: '/notify-config/',
updateNotify: '/notify-config/'
notifyConfigDetail: '/notify-config',
saveNotify: '/notify-config',
updateNotify: '/notify-config'
}
@ -28,7 +28,7 @@ export function getNotifyConfigList (parameter) {
export function getNotifyConfigDetail (id) {
return request({
url: retryApi.notifyConfigDetail + id,
url: `${retryApi.notifyConfigDetail}/${id}`,
method: 'get'
})
}
@ -68,7 +68,7 @@ export function sceneList (parameter) {
export function getSceneDetail (id) {
return request({
url: retryApi.sceneDetail + id,
url: `${retryApi.sceneDetail}/${id}`,
method: 'get'
})
}