pymensago/auth.py
def remove_device_session(db, devid: UUID) -> RetVal:
	'''	Removes an authorized device from the workspace. Returns a boolean success code.'''

	cursor = db.cursor()
	cursor.execute("SELECT devid FROM sessions WHERE devid=?", (devid.as_string(),))
	results = cursor.fetchone()
	if not results or not results[0]:
		return RetVal(ErrNotFound)

	cursor.execute("DELETE FROM sessions WHERE devid=?", (devid.as_string(),))
	db.commit()
	return RetVal()
	Removes an authorized device from the workspace. Returns a boolean success code.
Removes an authorized device from the workspace. Returns a boolean success code.
Removes an authorized device from the workspace . Returns a boolean success code .
def remove_device_session(db, devid: UUID) -> RetVal:
	cursor = db.cursor()
	cursor.execute("SELECT devid FROM sessions WHERE devid=?", (devid.as_string(),))
	results = cursor.fetchone()
	if not results or not results[0]:
		return RetVal(ErrNotFound)
	cursor.execute("DELETE FROM sessions WHERE devid=?", (devid.as_string(),))
	db.commit()
	return RetVal()
def remove_device_session ( db , devid : UUID ) -> RetVal : cursor = db . cursor ( ) cursor . execute ( "SELECT devid FROM sessions WHERE devid=?" , ( devid . as_string ( ) , ) ) results = cursor . fetchone ( ) if not results or not results [ 0 ] : return RetVal ( ErrNotFound ) cursor . execute ( "DELETE FROM sessions WHERE devid=?" , ( devid . as_string ( ) , ) ) db . commit ( ) return RetVal ( )
Removes an authorized device from the workspace.
Removes an authorized device from the workspace .
'''	Removes an authorized device from the workspace. Returns a boolean success code.'''
db
devid
UUID