TODO cleanup

This commit is contained in:
Mouse Reeve 2020-02-14 22:19:57 -08:00
parent a0323ead33
commit c4549e9b17
2 changed files with 2 additions and 3 deletions

View file

@ -24,7 +24,6 @@ def get_or_create_remote_user(actor):
data = response.json() data = response.json()
# the webfinger format for the username. # the webfinger format for the username.
# TODO: get the user's domain in a better way
actor_parts = urlparse(actor) actor_parts = urlparse(actor)
username = '%s@%s' % (actor_parts.path.split('/')[-1], actor_parts.netloc) username = '%s@%s' % (actor_parts.path.split('/')[-1], actor_parts.netloc)
shared_inbox = data.get('endpoints').get('sharedInbox') if \ shared_inbox = data.get('endpoints').get('sharedInbox') if \
@ -40,7 +39,7 @@ def get_or_create_remote_user(actor):
inbox=data['inbox'], #fail if there's no inbox inbox=data['inbox'], #fail if there's no inbox
outbox=data['outbox'], # fail if there's no outbox outbox=data['outbox'], # fail if there's no outbox
shared_inbox=shared_inbox, shared_inbox=shared_inbox,
# TODO: probably shouldn't bother to store this for remote users # TODO: I'm never actually using this for remote users
public_key=data.get('publicKey').get('publicKeyPem'), public_key=data.get('publicKey').get('publicKeyPem'),
local=False local=False
) )

View file

@ -13,7 +13,7 @@ SECRET_KEY = '7(2w1sedok=aznpq)ta1mc4i%4h=xx@hxwx*o57ctsuml0x%fr'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True
# TODO: this should be populated at runtime at least for debug mode # TODO: annoying that I keep changing and re-commiting this
DOMAIN = '26863dc9.ngrok.io' DOMAIN = '26863dc9.ngrok.io'
ALLOWED_HOSTS = ['*'] ALLOWED_HOSTS = ['*']
OL_URL = 'https://openlibrary.org' OL_URL = 'https://openlibrary.org'