mirror of
https://github.com/Radiquum/YAMPD.git
synced 2025-05-20 15:49:34 +05:00
feat: start pack view page
This commit is contained in:
parent
e109b5393a
commit
bb9ccaa6f1
6 changed files with 173 additions and 36 deletions
|
@ -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",
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue