File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
src/platform/remote/comfyui/history/fetchers Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,11 @@ export async function fetchHistoryV1(
3131 )
3232 }
3333
34- let url = `/history?max_items= ${ maxItems } `
34+ const params = new URLSearchParams ( { max_items : maxItems . toString ( ) } )
3535 if ( offset !== undefined ) {
36- url += `& offset= ${ offset } `
36+ params . set ( 'offset' , offset . toString ( ) )
3737 }
38+ const url = `/history?${ params . toString ( ) } `
3839 const res = await fetchApi ( url )
3940 const json : Record <
4041 string ,
Original file line number Diff line number Diff line change @@ -30,10 +30,11 @@ export async function fetchHistoryV2(
3030 )
3131 }
3232
33- let url = `/history_v2?max_items= ${ maxItems } `
33+ const params = new URLSearchParams ( { max_items : maxItems . toString ( ) } )
3434 if ( offset !== undefined ) {
35- url += `& offset= ${ offset } `
35+ params . set ( 'offset' , offset . toString ( ) )
3636 }
37+ const url = `/history_v2?${ params . toString ( ) } `
3738 const res = await fetchApi ( url )
3839 const rawData : HistoryResponseV2 = await res . json ( )
3940 const adaptedHistory = mapHistoryV2toHistory ( rawData )
You can’t perform that action at this time.
0 commit comments