Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
6aa1bcd6
Unverified
Commit
6aa1bcd6
authored
Nov 26, 2023
by
Jack Bauer
Committed by
GitHub
Nov 26, 2023
Browse files
Remove hard coded max_items in history API
parent
39e75862
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
web/scripts/api.js
web/scripts/api.js
+2
-2
No files found.
web/scripts/api.js
View file @
6aa1bcd6
...
@@ -254,9 +254,9 @@ class ComfyApi extends EventTarget {
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment