Skip to content

Commit

Permalink
fix(api): regression: set customary content type for dyn responses
Browse files Browse the repository at this point in the history
  • Loading branch information
peterthomassen committed Mar 2, 2021
1 parent a2d49d6 commit 899d9fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/desecapi/tests/test_dyndns12update.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def test_identification_by_query_params(self):
response = self.assertDynDNS12Update(username=self.my_domain.name, password=self.token.plain)
self.assertStatus(response, status.HTTP_200_OK)
self.assertEqual(response.data, 'good')
self.assertEqual(response.content_type, 'text/plain')
self.assertIP(ipv4='127.0.0.1')

def test_identification_by_query_params_with_subdomain(self):
Expand Down
2 changes: 1 addition & 1 deletion api/desecapi/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def get(self, request, *_):
with PDNSChangeTracker():
serializer.save()

return Response('good')
return Response('good', content_type='text/plain')


class DonationList(generics.CreateAPIView):
Expand Down

0 comments on commit 899d9fb

Please sign in to comment.