feat: start pack view page

This commit is contained in:
Kentai Radiquum 2025-05-05 23:03:57 +05:00
parent e109b5393a
commit bb9ccaa6f1
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
6 changed files with 173 additions and 36 deletions

View file

@ -3,6 +3,7 @@ from . import apiPacks
from flask import request, jsonify
from config import PACKS_FOLDER
import json
import shutil
@apiPacks.route("/all", methods=["GET"])
@ -59,3 +60,14 @@ def createPack():
"id": title,
}
)
@apiPacks.route("/<id>/delete", methods=["GET"])
def deletePack(id):
shutil.rmtree(f"{PACKS_FOLDER}/{id}")
return jsonify(
{
"status": "ok",
"message": f"pack deleted",
}
)