Skip to content

Commit

Permalink
docs: add docstrings to legacy web request handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Jan 18, 2022
1 parent a0df524 commit 78203d8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions nbgitpuller/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ async def get(self):


class LegacyGitSyncRedirectHandler(IPythonHandler):
"""
The /git-pull endpoint was previously exposed /git-sync.
For backward compatibility we keep listening to the /git-sync endpoint but
respond with a redirect to the /git-pull endpoint.
"""
@web.authenticated
async def get(self):
new_url = '{base}git-pull?{query}'.format(
Expand All @@ -187,6 +193,12 @@ async def get(self):


class LegacyInteractRedirectHandler(IPythonHandler):
"""
The /git-pull endpoint was previously exposed /interact.
For backward compatibility we keep listening to the /interact endpoint but
respond with a redirect to the /git-pull endpoint.
"""
@web.authenticated
async def get(self):
repo = self.get_argument('repo')
Expand Down

0 comments on commit 78203d8

Please sign in to comment.