2026-07-05 17:24:17 +02:00
|
|
|
import { apiFetch } from './client.js'
|
|
|
|
|
|
|
|
|
|
export function listSteeringMethods() {
|
|
|
|
|
return apiFetch('/api/steering/methods')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function updateInitiativeSteeringMethod(initiativeId, methodKey) {
|
|
|
|
|
return apiFetch(`/api/steering/initiatives/${initiativeId}/context`, {
|
|
|
|
|
method: 'PATCH',
|
|
|
|
|
body: JSON.stringify({ method_key: methodKey }),
|
|
|
|
|
})
|
|
|
|
|
}
|
2026-07-10 12:36:12 +02:00
|
|
|
|
|
|
|
|
export function updateInitiativeMethodProfile(initiativeId, methodProfileKey) {
|
|
|
|
|
const body = methodProfileKey
|
|
|
|
|
? { method_profile_key: methodProfileKey }
|
|
|
|
|
: { clear_method_profile: true }
|
|
|
|
|
return apiFetch(`/api/steering/initiatives/${initiativeId}/context`, {
|
|
|
|
|
method: 'PATCH',
|
|
|
|
|
body: JSON.stringify(body),
|
|
|
|
|
})
|
|
|
|
|
}
|