from django.contrib.auth.models import User
from oauth2_provider.models import AccessToken
from datetime import timedelta
from datetime import datetime


def refresh(id):
    user = User.objects.get(id=id)
    access = AccessToken.objects.filter(user=user).last()
    # access.expires = datetime.now() + timedelta(minutes=30)
    # access.save()

