Function to return featured tags collection

merge-requests/30/head
Bob Mottram 2021-01-21 14:18:32 +00:00
parent 36c9827ce4
commit 4bf0ee92eb
1 changed files with 23 additions and 0 deletions

View File

@ -8979,6 +8979,22 @@ class PubServer(BaseHTTPRequestHandler):
None, callingDomain)
self._write(msg)
def _getFeaturedTagsCollection(self, callingDomain: str,
path: str,
httpPrefix: str,
domainFull: str):
"""Returns the featured tags collections in
actor/collections/featuredTags
TODO add ability to set a featured tags
"""
featuredTagsCollection = {}
msg = json.dumps(featuredTagsCollection,
ensure_ascii=False).encode('utf-8')
msglen = len(msg)
self._set_headers('application/json', msglen,
None, callingDomain)
self._write(msg)
def _showPersonProfile(self, authorized: bool,
callingDomain: str, path: str,
baseDir: str, httpPrefix: str,
@ -10015,6 +10031,13 @@ class PubServer(BaseHTTPRequestHandler):
self.server.domainFull)
return
if usersInPath and self.path.endswith('/collections/featuredTags'):
self._getFeaturedTagsCollection(callingDomain,
self.path,
self.server.httpPrefix,
self.server.domainFull)
return
self._benchmarkGETtimings(GETstartTime, GETtimings,
'sharedInbox enabled', 'rss3 done')