mirror of
https://github.com/Eugeny/tabby-web.git
synced 2026-08-18 15:26:04 +01:00
.
This commit is contained in:
@@ -131,7 +131,7 @@ class UserSerializer(ModelSerializer):
|
||||
read_only_fields = ('id', 'username')
|
||||
|
||||
def get_is_pro(self, obj):
|
||||
return check_is_sponsor_cached(obj) or obj.force_pro
|
||||
return obj.force_pro or not settings.GITHUB_ELIGIBLE_SPONSORSHIPS or check_is_sponsor_cached(obj)
|
||||
|
||||
def get_is_sponsor(self, obj):
|
||||
return check_is_sponsor_cached(obj)
|
||||
|
||||
@@ -8,6 +8,8 @@ from urllib.parse import urlparse
|
||||
|
||||
class IndexView(APIView):
|
||||
def get(self, request, format=None):
|
||||
if settings.FRONTEND_URL:
|
||||
return HttpResponseRedirect(settings.FRONTEND_URL)
|
||||
return static.serve(request, 'index.html', document_root=str(settings.FRONTEND_BUILD_DIR))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user