fix(campaigns): drop dead force param from activateCampaign API client
The backend endpoint no longer accepts a force query param (a draft campaign can never have a future start_date to force past). No frontend code currently calls this function, but keep it matching the real backend contract in case a future admin UI wires it up.
This commit is contained in:
@@ -166,13 +166,9 @@ export async function removeTestFromCampaign(
|
||||
await client.delete(`/campaigns/${campaignId}/tests/${campaignTestId}`);
|
||||
}
|
||||
|
||||
/** Activate a campaign. */
|
||||
export async function activateCampaign(
|
||||
campaignId: string,
|
||||
options?: { force?: boolean },
|
||||
): Promise<Campaign> {
|
||||
const params = options?.force ? "?force=true" : "";
|
||||
const { data } = await client.post<Campaign>(`/campaigns/${campaignId}/activate${params}`);
|
||||
/** Admin-only emergency override: activate a draft campaign directly, bypassing the approval queue. */
|
||||
export async function activateCampaign(campaignId: string): Promise<Campaign> {
|
||||
const { data } = await client.post<Campaign>(`/campaigns/${campaignId}/activate`);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user