Skip to content

Commit

Permalink
revert unnecessary serving of template name when sending template con…
Browse files Browse the repository at this point in the history
…tents
  • Loading branch information
timkpaine committed Jan 16, 2024
1 parent 4da4ef1 commit d45c37c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions jupyterlab_templates/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,9 @@ def initialize(self, loader):
@tornado.web.authenticated
def get(self):
temp = self.get_argument("template", "")
if not temp:
return self.set_status(404)
template_data = self.loader.get_templates()[1][temp]
response = {"template_data": template_data, "template_label": self.loader.template_label}
self.finish(response)
if temp:
self.finish(self.loader.get_templates()[1][temp])
self.set_status(404)


class TemplateNamesHandler(JupyterHandler):
Expand Down

0 comments on commit d45c37c

Please sign in to comment.