From 3e6fbc8f7977108d133e2ecd6e0ba26577d4834d Mon Sep 17 00:00:00 2001 From: Terrtia Date: Fri, 26 Apr 2019 10:04:07 +0200 Subject: [PATCH] fix: [paste submit] update broken endpoint + get item date --- bin/submit_paste.py | 4 ++++ var/www/modules/PasteSubmit/templates/submiting.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/submit_paste.py b/bin/submit_paste.py index bbcd42a8..f2d468a2 100755 --- a/bin/submit_paste.py +++ b/bin/submit_paste.py @@ -96,6 +96,10 @@ def remove_submit_uuid(uuid): r_serv_db.srem('submitted:uuid', uuid) print('{} all file submitted'.format(uuid)) +def get_item_date(item_filename): + l_directory = item_filename.split('/') + return '{}{}{}'.format(l_directory[-4], l_directory[-3], l_directory[-2]) + def add_item_tag(tag, item_path): item_date = int(get_item_date(item_path)) diff --git a/var/www/modules/PasteSubmit/templates/submiting.html b/var/www/modules/PasteSubmit/templates/submiting.html index b049120c..f43a7b3d 100644 --- a/var/www/modules/PasteSubmit/templates/submiting.html +++ b/var/www/modules/PasteSubmit/templates/submiting.html @@ -188,7 +188,7 @@ ERROR -