feat(api): Add device config to device

!2
This commit is contained in:
2024-05-16 13:15:48 +09:30
parent f59ffa581c
commit 0c38155c44
3 changed files with 10 additions and 7 deletions

View File

@ -8,9 +8,9 @@ from rest_framework.response import Response
class View(views.APIView):
def get(self, request, device_name):
def get(self, request, slug):
device = Device.objects.get(slug=device_name)
device = Device.objects.get(slug=slug)
return Response(device.get_configuration(device.id))