Toggle navigation
Toggle navigation
This project
Loading...
Sign in
cse437_e
/
smartdoorlock-backend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
dahee kim
2020-11-19 11:52:56 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
44d981d9b30a66260681b3ac86be08d3b42bef1b
44d981d9
1 parent
5e8594e1
fix:
delete a dependency
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
api/views.py
api/views.py
View file @
44d981d
...
...
@@ -9,7 +9,7 @@ from django.contrib.auth.models import User
from
api.videorecord
import
record
from
api.models
import
Video
,
Device
,
RemoteHistory
,
Lock
,
Record
,
Door
from
api.serializers
import
VideoSerializer
,
DeviceSerializer
,
RemoteHistorySerializer
,
RecordSerializer
,
DoorSerializer
from
api.serializers
import
VideoSerializer
,
DeviceSerializer
,
RemoteHistorySerializer
,
RecordSerializer
from
rest_framework
import
status
from
rest_framework.views
import
APIView
...
...
@@ -31,6 +31,7 @@ import uuid
#로그인 및 토큰 반환
class
Login
(
APIView
)
:
def
get
(
self
,
request
,
format
=
None
)
:
# request query에 door_id 포함되어있음 : api/auth?door_id=12345
try
:
request_id
=
request
.
GET
.
get
(
'door_id'
,
None
)
...
...
@@ -59,15 +60,18 @@ class Login(APIView) :
'date'
:
datetime
.
now
()
},
status
=
status
.
HTTP_400_BAD_REQUEST
)
'''
def post(self, request, format = None) :
queryset = Door.objects.create(door_id = 12345)
print('냐냐')
return Response({
'msg' : 'doorid값 삽입 완료',
})
'''
#기기 관련 api
class
Devices
(
APIView
)
:
# 기기 목록 조회
...
...
Please
register
or
login
to post a comment