remove /webmention-interactive (for old Web-specific update profile button)

pull/968/head
Ryan Barrett 2024-04-22 20:25:48 -07:00
rodzic 115d85909a
commit 0c41f0e081
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
1 zmienionych plików z 2 dodań i 22 usunięć

24
web.py
Wyświetl plik

@ -644,32 +644,12 @@ def webmention_external():
if not user:
error(f'No user found for domain {domain}')
if request.path == '/webmention': # exclude interactive
user.last_webmention_in = util.now()
user.put()
user.last_webmention_in = util.now()
user.put()
return common.create_task('webmention', **request.form)
@app.post('/webmention-interactive')
def webmention_interactive():
"""Handler that runs interactive webmention-based requests from the web UI.
...eg the update profile button on user pages.
"""
source = flask_util.get_required_param('source').strip()
try:
webmention_external()
user = Web(id=util.domain_from_link(source, minimize=False))
flash(f'Updating profile from <a href="{user.web_url()}">{user.key.id()}</a>...')
return redirect(user.user_page_path(), code=302)
except HTTPException as e:
flash(util.linkify(str(e.description), pretty=True))
return redirect('/', code=302)
@app.post(f'/queue/poll-feed')
@cloud_tasks_only
def poll_feed_task():