Url and views for instance actor and webfinger
This commit is contained in:
parent
e793f8365f
commit
75710638de
5 changed files with 181 additions and 0 deletions
21
api/funkwhale_api/federation/serializers.py
Normal file
21
api/funkwhale_api/federation/serializers.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
from django.urls import reverse
|
||||
from django.conf import settings
|
||||
|
||||
from . import utils
|
||||
|
||||
|
||||
def repr_instance_actor():
|
||||
"""
|
||||
We do not use a serializer here, since it's pretty static
|
||||
"""
|
||||
return {
|
||||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1',
|
||||
{},
|
||||
],
|
||||
'id': utils.full_url(reverse('federation:instance-actor')),
|
||||
'type': 'Service',
|
||||
'inbox': utils.full_url(reverse('federation:instance-inbox')),
|
||||
'outbox': utils.full_url(reverse('federation:instance-outbox')),
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue