This commit is contained in:
Jack Eilles 2024-01-12 09:40:13 +00:00
parent 4b3d44536d
commit 74a24c3709

View file

@ -169,7 +169,7 @@ def delete(id):
data = Config.files.find_one({"id": id}) data = Config.files.find_one({"id": id})
if data["userid"] == request.form.get("userid") and bcrypt.check_password_hash(Config.user.find_one({"userid": data["userid"]})["idpass"], request.form.get("idpass")): if data["userid"] == request.form.get("userid") and bcrypt.check_password_hash(Config.users.find_one({"userid": data["userid"]})["idpass"], request.form.get("idpass")):
Config.files.delete_one({"id": id}) Config.files.delete_one({"id": id})
os.remove(os.path.join(Config.fileDir, secure_filename(id))) os.remove(os.path.join(Config.fileDir, secure_filename(id)))
return "File deleted." return "File deleted."