Skip to content

Commit a2ea3eb

Browse files
committed
added : Clear all api contents
1 parent 21059f4 commit a2ea3eb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/pytgpt/console.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2396,17 +2396,18 @@ def run(port, bind, log_level):
23962396

23972397
@staticmethod
23982398
@click.command(context_settings=this.context_settings)
2399-
@click.argument("content", required=True, type=click.Choice(["images"]))
2399+
@click.argument("content", required=True, type=click.Choice(["images", "all"]))
24002400
@click.option("-y", "--yes", is_flag=True, help="Okay to all confirmation prompts")
24012401
@click.help_option("-h", "--help")
24022402
def clear(content: str, yes: bool):
2403-
"""Clear api's static contents"""
2404-
from pytgpt.utils import api_static_image_dir
2403+
"""Delete api's static contents"""
2404+
from pytgpt.utils import api_static_image_dir, api_static_dir
24052405
from pathlib import Path
24062406
import shutil
24072407

24082408
static_contents_map: dict[str, Path] = {
24092409
"images": api_static_image_dir,
2410+
"all": api_static_dir,
24102411
}
24112412
content_path: Path = static_contents_map[content]
24122413
if not yes:

0 commit comments

Comments
 (0)