forked from 3wordchant/capsul-flask
implement deleting capsuls
This commit is contained in:
capsulflask
@ -90,7 +90,7 @@ class DBModel:
|
||||
self.cursor.fetchall()
|
||||
))
|
||||
|
||||
def updateVm(self, email, id, ipv4):
|
||||
def update_vm_ip(self, email, id, ipv4):
|
||||
self.cursor.execute("UPDATE vms SET last_seen_ipv4 = %s WHERE email = %s AND id = %s", (ipv4, email, id))
|
||||
self.connection.commit()
|
||||
|
||||
@ -111,9 +111,9 @@ class DBModel:
|
||||
)
|
||||
self.connection.commit()
|
||||
|
||||
# def vm_exists(self, email, id):
|
||||
# self.cursor.execute("SELECT id FROM vms WHERE email = %s AND id = %s ", (email, id))
|
||||
# return len(self.cursor.fetchall()) > 0
|
||||
def delete_vm(self, email, id):
|
||||
self.cursor.execute("UPDATE vms SET deleted = now() WHERE email = %s AND id = %s", ( email, id))
|
||||
self.connection.commit()
|
||||
|
||||
def get_vm_detail(self, email, id):
|
||||
self.cursor.execute("""
|
||||
|
Reference in New Issue
Block a user