Skip to content

Commit

Permalink
Merge branch 'main' into manual-payment-check
Browse files Browse the repository at this point in the history
  • Loading branch information
F-Node-Karlsruhe authored Jun 28, 2021
2 parents d998159 + c7aa15a commit 34c9f8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,15 @@ def proxy(slug):
return ghost.get_post(slug, get_exp_date(user_token_hash))

return render_template('expired.html',
exp_date = datetime.fromisoformat(pop_from_paid_db(user_token_hash)).strftime('%d.%m.%y %H:%M'))
exp_date = datetime.fromisoformat(pop_from_paid_db(user_token_hash)).strftime('%d.%m.%y %H:%M UTC'))

return ghost.get_post_payment(slug, render_template('pay.html',
user_token_hash = user_token_hash,
iota_address = get_iota_address(slug, iota_listener),
price = price_per_content,
exp_date = (datetime.utcnow() + timedelta(hours = session_lifetime))
.strftime('%d.%m.%y %H:%M')))
.strftime('%d.%m.%y %H:%M UTC')))



# socket endpoint to receive payment event
Expand Down
2 changes: 1 addition & 1 deletion ghost_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_post(slug, exp_date):
# append expire date
html.find('div', {'class': 'byline-meta-content'}).append(BeautifulSoup(
'<time class="byline-meta-date"><span class="bull">•</span>Expires %s</time>'
% exp_date.strftime('%d.%m.%y %H:%M'),
% exp_date.strftime('%d.%m.%y %H:%M UTC'),
"html.parser"))

# insert the actual post content
Expand Down

0 comments on commit 34c9f8c

Please sign in to comment.