feat: Allow admin to delete any link
All checks were successful
Build Docker / Build Main Image (push) Successful in 21s

This commit is contained in:
2023-11-17 12:08:13 +11:00
parent 3111bf9204
commit afbae819c9
2 changed files with 12 additions and 2 deletions

View File

@@ -145,8 +145,10 @@ def delete(path):
resp = make_response(redirect('/'))
resp.set_cookie('linkr', '', expires=0)
return resp
db.delete_link(path,domain)
if domain.lower() != ADMIN_DOMAIN:
db.delete_link(path,domain)
else:
db.delete_link_admin(path,domain)
return redirect('/dash')