Grab links from the sign
This commit is contained in:
parent
f25fa9f025
commit
4b5d0181b5
|
@ -30,6 +30,7 @@ DEFAULTS = {
|
||||||
'track': {},
|
'track': {},
|
||||||
'alarm': {},
|
'alarm': {},
|
||||||
'sign': '',
|
'sign': '',
|
||||||
|
'link': '',
|
||||||
'autoscan': '',
|
'autoscan': '',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -576,6 +576,10 @@ class StatsViewSet(viewsets.ViewSet, List):
|
||||||
def sign(self, request):
|
def sign(self, request):
|
||||||
try:
|
try:
|
||||||
sign = request.data['sign'][:500]
|
sign = request.data['sign'][:500]
|
||||||
|
|
||||||
|
if sign.startswith('https://') or sign.startswith('http://'):
|
||||||
|
cache.set('link', sign)
|
||||||
|
else:
|
||||||
cache.set('sign', sign)
|
cache.set('sign', sign)
|
||||||
|
|
||||||
if secrets.SIGN_TOKEN:
|
if secrets.SIGN_TOKEN:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user