|
@@ -174,7 +174,7 @@ class ModelService:
|
|
|
|
|
|
@staticmethod
|
|
|
def add_log(ip, userID, operation):
|
|
|
- file_path = '/'.join((BASE_DIR, 'static/delete_device.log'))
|
|
|
+ file_path = '/'.join((BASE_DIR, 'static/add_device.log'))
|
|
|
file = open(file_path, 'a+')
|
|
|
file.write(ip + "; username:" + userID + "; time:" + time.strftime(
|
|
|
"%Y-%m-%d %H:%M:%S", time.localtime()) + "; " + operation)
|
|
@@ -182,6 +182,16 @@ class ModelService:
|
|
|
file.flush()
|
|
|
file.close()
|
|
|
|
|
|
+ @staticmethod
|
|
|
+ def delete_log(ip, userID, operation, UID):
|
|
|
+ file_path = '/'.join((BASE_DIR, 'static/delete_device.log'))
|
|
|
+ file = open(file_path, 'a+')
|
|
|
+ file.write(ip + "; username:" + userID + "; time:" + time.strftime(
|
|
|
+ "%Y-%m-%d %H:%M:%S", time.localtime()) + "; " + operation + "; uid:"+UID)
|
|
|
+ file.write('\n')
|
|
|
+ file.flush()
|
|
|
+ file.close()
|
|
|
+
|
|
|
|
|
|
def notify_alexa_delete(userID, UID):
|
|
|
url = 'https://www.zositech.xyz/deviceStatus/delete'
|