From 5af2aeda7e44e1b100b51df6da60e9ee7b2b2dcf Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 18 Aug 2020 12:02:56 +0300 Subject: [PATCH] Add an endpoint to know if a server is an etebase server or not. Very useful for when migrating people from legacy EteSync apps because we can automatically know if they are running a self-hosted etesync or etebase server. --- django_etebase/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/django_etebase/views.py b/django_etebase/views.py index 9d76d08..1e9b8b5 100644 --- a/django_etebase/views.py +++ b/django_etebase/views.py @@ -687,6 +687,10 @@ class AuthenticationViewSet(viewsets.ViewSet): return None + @action_decorator(detail=False, methods=['GET']) + def is_etebase(self, request, *args, **kwargs): + return Response({}, status=status.HTTP_200_OK) + @action_decorator(detail=False, methods=['POST']) def login_challenge(self, request, *args, **kwargs): from datetime import datetime