Skip to content

Commit

Permalink
quick_setup: rename save action endpoint and types
Browse files Browse the repository at this point in the history
Depends on https://review.lan.tribe29.com/c/check_mk/+/91453

CMK-20707

Change-Id: Ied0e8aa59899336a2f1767ebbd180f272df29510
  • Loading branch information
lpetrora committed Dec 17, 2024
1 parent 3bd49f3 commit 070449d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/cmk-frontend-vue/src/quick-setup/rest-api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import type {
QuickSetupOverviewResponse,
QuickSetupStageStructure
} from './response_types'
import type { QuickSetupFinalSaveRequest, QuickSetupStageActionRequest } from './request_types'
import type { QuickSetupFinalActionRequest, QuickSetupStageActionRequest } from './request_types'
import { wait } from '@/lib/utils'
/**
* Wait until background job is finished
Expand Down Expand Up @@ -97,7 +97,7 @@ export const saveQuickSetup = async (
formData: StageData[]
): Promise<QuickSetupCompleteResponse> => {
const url = SAVE_QUICK_SETUP_URL.replace('{QUICK_SETUP_ID}', quickSetupId)
const payload: QuickSetupFinalSaveRequest = {
const payload: QuickSetupFinalActionRequest = {
button_id: buttonId,
stages: formData.map((step) => ({ form_data: step }))
}
Expand Down Expand Up @@ -128,7 +128,7 @@ export const editQuickSetup = async (
'{QUICK_SETUP_ID}',
quickSetupId
)
const payload: QuickSetupFinalSaveRequest = {
const payload: QuickSetupFinalActionRequest = {
button_id: buttonId,
stages: formData.map((step) => ({ form_data: step }))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const FETCH_QUICK_SETUP_STAGE_STRUCTURE_URL = `${API_ROOT}/objects/quick_
export const VALIDATE_AND_RECAP_STAGE_URL = `${API_ROOT}/objects/quick_setup/{QUICK_SETUP_ID}/actions/run-stage-action/invoke`

/** @constant {string} SAVE_QUICK_SETUP_URL - Save the quick setup */
export const SAVE_QUICK_SETUP_URL = `${API_ROOT}/objects/quick_setup/{QUICK_SETUP_ID}/actions/save/invoke`
export const SAVE_QUICK_SETUP_URL = `${API_ROOT}/objects/quick_setup/{QUICK_SETUP_ID}/actions/run-action/invoke`

/** @constant {string} EDIT_QUICK_SETUP_URL - Edit the quick setup */
export const EDIT_QUICK_SETUP_URL = `${API_ROOT}/objects/quick_setup/{QUICK_SETUP_ID}/actions/edit/invoke`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export interface QuickSetupStageActionRequest {
}

/**
* Save the quick setup
* Execute action on final stage
*/
export interface QuickSetupFinalSaveRequest {
export interface QuickSetupFinalActionRequest {
button_id: string
stages: QuickSetupStageRequest[]
}

0 comments on commit 070449d

Please sign in to comment.