feat: Allow admin to delete any link
All checks were successful
Build Docker / Build Main Image (push) Successful in 21s
All checks were successful
Build Docker / Build Main Image (push) Successful in 21s
This commit is contained in:
parent
3111bf9204
commit
afbae819c9
8
db.py
8
db.py
@ -169,3 +169,11 @@ def delete_link(url,domain):
|
||||
connection.commit()
|
||||
cursor.close()
|
||||
connection.close()
|
||||
|
||||
def delete_link_admin(url):
|
||||
connection = mysql.connector.connect(**dbargs)
|
||||
cursor = connection.cursor()
|
||||
cursor.execute("DELETE FROM links WHERE url=%s", (url,))
|
||||
connection.commit()
|
||||
cursor.close()
|
||||
connection.close()
|
Loading…
Reference in New Issue
Block a user