File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ import type {
1212 CampaignResponse ,
1313 UpdateRequest ,
1414 ListResponse ,
15- SearchOptions , DuplicateOptions ,
15+ SearchOptions ,
16+ DuplicateOptions ,
1617} from './types' ;
1718
1819export type Client = ReturnType < typeof createClient > ;
@@ -48,8 +49,13 @@ export function createClient(api: DeferredJobsApiClient) {
4849 return api . get < CampaignResponse > ( `${ routing . campaignsUrl } /${ id } ` ) ;
4950 }
5051
51- async function duplicate ( id : Campaign [ 'id' ] , options ?: DuplicateOptions ) : Promise < CampaignResponse > {
52- return api . post < CampaignResponse > ( `${ routing . campaignsUrl } /${ id } /duplicate` , { payload : options } ) ;
52+ async function duplicate (
53+ id : Campaign [ 'id' ] ,
54+ options ?: DuplicateOptions ,
55+ ) : Promise < CampaignResponse > {
56+ return api . post < CampaignResponse > ( `${ routing . campaignsUrl } /${ id } /duplicate` , {
57+ payload : options ,
58+ } ) ;
5359 }
5460
5561 async function doDelete ( id : Campaign [ 'id' ] ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments