Showing
1 changed file
with
3 additions
and
3 deletions
... | @@ -202,7 +202,7 @@ class Remote(APIView): | ... | @@ -202,7 +202,7 @@ class Remote(APIView): |
202 | }, status = status.HTTP_400_BAD_REQUEST) | 202 | }, status = status.HTTP_400_BAD_REQUEST) |
203 | 203 | ||
204 | # 원격 잠금 해제 | 204 | # 원격 잠금 해제 |
205 | - def put(self, request, format = None) : | 205 | + def post(self, request, format = None) : |
206 | try: | 206 | try: |
207 | if request.auth == None : | 207 | if request.auth == None : |
208 | raise PermissionDenied | 208 | raise PermissionDenied |
... | @@ -218,8 +218,8 @@ class Remote(APIView): | ... | @@ -218,8 +218,8 @@ class Remote(APIView): |
218 | if state == True: | 218 | if state == True: |
219 | print(">> 원격 잠금해제 요청이 들어옴") | 219 | print(">> 원격 잠금해제 요청이 들어옴") |
220 | # 기록에 저장 | 220 | # 기록에 저장 |
221 | - now = datetime.datetime.now() | 221 | + now = datetime.now() |
222 | - queryset = Device.objects.create(device_name=device_name, created=now) | 222 | + queryset = RemoteHistory.objects.create(device_name=device_name, created=now) |
223 | queryset.save() | 223 | queryset.save() |
224 | # 잠금 해제 상태로 변경 | 224 | # 잠금 해제 상태로 변경 |
225 | target.state = False | 225 | target.state = False | ... | ... |
-
Please register or login to post a comment