#NEWLINE# @ list_route ( methods = [ 'post' ] , permission_classes = [ IsAuthenticated ] ) #NEWLINE# def online( self , request , * args , **kwargs ) : #NEWLINE# #INDENT# user = request . user #NEWLINE# provider = RedisProvider ( ) #NEWLINE# provider . set_hash ( 'online' , user . id , datetime . utcnow ( ) ) #NEWLINE# return Response ( data = { #NEWLINE# #INDENT# 'message' : 'Success' , #NEWLINE# #UNINDENT# } , status = status . HTTP_200_OK )