mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-02 16:21:32 -08:00
Add test route to call replay_inbox_request with manually defined request_json
This commit is contained in:
parent
3b800e7e96
commit
ba10663983
1 changed files with 21 additions and 0 deletions
|
@ -426,6 +426,27 @@ def list_files(directory):
|
|||
yield os.path.join(root, file)
|
||||
|
||||
|
||||
@bp.route('/replay_inbox')
|
||||
@login_required
|
||||
def replay_inbox():
|
||||
from app.activitypub.routes import replay_inbox_request
|
||||
|
||||
request_json = {}
|
||||
"""
|
||||
request_json = {"@context": ["https://join-lemmy.org/context.json", "https://www.w3.org/ns/activitystreams"],
|
||||
"actor": "https://lemmy.lemmy/u/doesnotexist",
|
||||
"cc": [],
|
||||
"id": "https://lemmy.lemmy/activities/delete/5d42c8bf-cc60-4d2c-a3b5-673ddb7ce64b",
|
||||
"object": "https://lemmy.lemmy/u/doesnotexist",
|
||||
"to": ["https://www.w3.org/ns/activitystreams#Public"],
|
||||
"type": "Delete"}
|
||||
"""
|
||||
|
||||
replay_inbox_request(request_json)
|
||||
|
||||
return 'ok'
|
||||
|
||||
|
||||
@bp.route('/test')
|
||||
def test():
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue