mirror of
https://github.com/jackeilles/xygt.git
synced 2024-11-08 16:02:37 +01:00
more. MORE. MOOOOOOORE.
This commit is contained in:
parent
ddb04bdaa8
commit
4b3d44536d
1 changed files with 2 additions and 2 deletions
|
@ -169,12 +169,12 @@ def delete(id):
|
|||
|
||||
data = Config.files.find_one({"id": id})
|
||||
|
||||
if data["userid"] == current_user.userid:
|
||||
if data["userid"] == request.form.get("userid") and bcrypt.check_password_hash(Config.user.find_one({"userid": data["userid"]})["idpass"], request.form.get("idpass")):
|
||||
Config.files.delete_one({"id": id})
|
||||
os.remove(os.path.join(Config.fileDir, secure_filename(id)))
|
||||
return "File deleted."
|
||||
|
||||
elif data["userid"] == request.form.get("userid") and bcrypt.check_password_hash(Config.user.find_one({"userid": data["userid"]})["idpass"], request.form.get("idpass")):
|
||||
elif data["userid"] == current_user.userid:
|
||||
Config.files.delete_one({"id": id})
|
||||
os.remove(os.path.join(Config.fileDir, secure_filename(id)))
|
||||
return "File deleted."
|
||||
|
|
Loading…
Reference in a new issue