File size: 370 Bytes
947c08e
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
from backend.models.model_cache import CloudflareTurnStileCache
from backend.module.utils import date_utils

def check(token):
    
    CloudflareTurnStileCache.objects.filter(datetime__lte=date_utils.utc_time().add(-30 ,'minute').get()).delete()
    result = CloudflareTurnStileCache.objects.filter(token=token).first()
    if result: return True
    else: return False