This commit is contained in:
wh1te909 2020-12-13 11:45:24 +00:00
parent 1b1eec40a7
commit f69446b648
2 changed files with 28 additions and 26 deletions

View File

@ -94,6 +94,7 @@ class CheckIn(APIView):
serializer = WinAgentSerializer(instance=agent, data=request.data, partial=True)
serializer.is_valid(raise_exception=True)
if "disks" in request.data.keys():
disks = request.data["disks"]
new = []
# python agent
@ -113,14 +114,15 @@ class CheckIn(APIView):
tmp["percent"] = int(disk["percent"])
new.append(tmp)
if request.data["logged_in_username"] == "None":
serializer.save(disks=new)
else:
serializer.save(
disks=new,
last_logged_in_user=request.data["logged_in_username"],
)
return Response("ok")
if "logged_in_username" in request.data.keys():
if request.data["logged_in_username"] != "None":
serializer.save(last_logged_in_user=request.data["logged_in_username"])
return Response("ok")
serializer.save()
return Response("ok")
def post(self, request):

View File

@ -15,7 +15,7 @@ EXE_DIR = os.path.join(BASE_DIR, "tacticalrmm/private/exe")
AUTH_USER_MODEL = "accounts.User"
# latest release
TRMM_VERSION = "0.2.15"
TRMM_VERSION = "0.2.16"
# bump this version everytime vue code is changed
# to alert user they need to manually refresh their browser
@ -25,7 +25,7 @@ APP_VER = "0.0.99"
LATEST_SALT_VER = "1.1.0"
# https://github.com/wh1te909/rmmagent
LATEST_AGENT_VER = "1.1.10"
LATEST_AGENT_VER = "1.1.11"
MESH_VER = "0.7.14"