MCPcopy Index your code
hub / github.com/WebODM/WebODM / post

Method post

coreplugins/dronedb/api_views.py:62–80  ·  view source on GitHub ↗
(self, request)

Source from the content-addressed store, hash-verified

60
61class CheckCredentialsTaskView(TaskView):
62 def post(self, request):
63
64 # Read form data
65 hub_url = request.data.get('hubUrl', None)
66 username = request.data.get('userName', None)
67 password = request.data.get('password', None)
68
69 # Make sure both values are set
70 if hub_url == None or username == None or password == None:
71 return Response({'error': 'All fields must be set.'}, status=status.HTTP_400_BAD_REQUEST)
72
73 try:
74
75 ddb = DroneDB(hub_url, username, password)
76
77 return Response({'success': ddb.login()}, status=status.HTTP_200_OK)
78
79 except(Exception) as e:
80 return Response({'error': str(e)}, status=status.HTTP_400_BAD_REQUEST)
81
82class OrganizationsTaskView(TaskView):
83 def get(self, request):

Callers

nothing calls this directly

Calls 3

loginMethod · 0.95
DroneDBClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected