feat: Add get all links function
All checks were successful
Build Docker / Build Main Image (push) Successful in 19s
All checks were successful
Build Docker / Build Main Image (push) Successful in 19s
This commit is contained in:
parent
19e2064a7a
commit
73ef222feb
11
db.py
11
db.py
@ -129,6 +129,17 @@ def get_users_links(domain):
|
|||||||
return False
|
return False
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def get_all_links():
|
||||||
|
connection = mysql.connector.connect(**dbargs)
|
||||||
|
cursor = connection.cursor()
|
||||||
|
cursor.execute("SELECT * FROM links")
|
||||||
|
result = cursor.fetchall()
|
||||||
|
cursor.close()
|
||||||
|
connection.close()
|
||||||
|
if result == None:
|
||||||
|
return False
|
||||||
|
return result
|
||||||
|
|
||||||
def get_link(url):
|
def get_link(url):
|
||||||
connection = mysql.connector.connect(**dbargs)
|
connection = mysql.connector.connect(**dbargs)
|
||||||
cursor = connection.cursor()
|
cursor = connection.cursor()
|
||||||
|
Loading…
Reference in New Issue
Block a user