|
@@ -80,12 +80,12 @@ def _get_clip(route):
|
|
def clip(route):
|
|
def clip(route):
|
|
return redirect(f'/{route}.sql')
|
|
return redirect(f'/{route}.sql')
|
|
|
|
|
|
-@route('/<route:re:(clip|goto)>/<hash:re:{B32REGEX}{{1,5}}>', method='GET')
|
|
|
|
-def get_clip(route, filename):
|
|
|
|
- return redirect(f'/{route}.sql?hash={filename}&go=true')
|
|
|
|
|
|
+@route(f'/<route:re:(clip|goto)>/<hash:re:{B32REGEX}{{1,5}}>', method='GET')
|
|
|
|
+def get_clip(route, hash):
|
|
|
|
+ return redirect(f'/{route}.sql?hash={hash}&go=true')
|
|
|
|
|
|
@route(f'/upload/<hash:re:{B32REGEX}{{1,5}}>', method='GET')
|
|
@route(f'/upload/<hash:re:{B32REGEX}{{1,5}}>', method='GET')
|
|
-def get_upload(hash, db=None):
|
|
|
|
|
|
+def get_upload(hash):
|
|
hash = hash and normalize_base32(hash)
|
|
hash = hash and normalize_base32(hash)
|
|
con = connect('util.db')
|
|
con = connect('util.db')
|
|
fname, mimetype, content = (None, None, None)
|
|
fname, mimetype, content = (None, None, None)
|