mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-20 03:13:30 +00:00
Remove hard coded max_items in history API
This commit is contained in:
parent
39e75862b2
commit
6aa1bcd601
@ -254,9 +254,9 @@ class ComfyApi extends EventTarget {
|
|||||||
* Gets the prompt execution history
|
* Gets the prompt execution history
|
||||||
* @returns Prompt history including node outputs
|
* @returns Prompt history including node outputs
|
||||||
*/
|
*/
|
||||||
async getHistory() {
|
async getHistory(max_items=200) {
|
||||||
try {
|
try {
|
||||||
const res = await this.fetchApi("/history?max_items=200");
|
const res = await this.fetchApi(`/history?max_items=${max_items}`);
|
||||||
return { History: Object.values(await res.json()) };
|
return { History: Object.values(await res.json()) };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
Loading…
Reference in New Issue
Block a user