|
@@ -296,3 +296,12 @@ class PinboardImport(Endpoint):
|
|
class ServiceWorker(Endpoint):
|
|
class ServiceWorker(Endpoint):
|
|
def route(self, *args, **kwargs):
|
|
def route(self, *args, **kwargs):
|
|
return flask.send_file("../js/serviceWorker.js", mimetype="text/javascript")
|
|
return flask.send_file("../js/serviceWorker.js", mimetype="text/javascript")
|
|
|
|
+
|
|
|
|
+@endpoint("/add-link")
|
|
|
|
+class AddLink(Endpoint):
|
|
|
|
+ def html(self):
|
|
|
|
+ if not self.user:
|
|
|
|
+ raise e.LCRedirect("/login")
|
|
|
|
+ else:
|
|
|
|
+ args = "&".join(f"{key}={value}" for key, value in flask.request.args.items())
|
|
|
|
+ raise e.LCRedirect(f"/u/{self.user.name}/l?{args}")
|