This commit is contained in:
A B
2024-10-26 12:22:19 +00:00
parent c4d9254824
commit a1ff998b68
4 changed files with 8 additions and 7 deletions

View File

@@ -47,12 +47,13 @@ def sync_server(id):
return {"status": Server.objects.get(id=id).sync()}
@shared_task(name="sync_user_on_server")
def sync_user(user, server_id):
def sync_user(user_id, server_id):
from .models import User, ACL
from vpn.server_plugins import Server
errors = {}
result = {}
user = User.objects.get(id=user_id)
acls = ACL.objects.filter(user=user)
server = Server.objects.get(id=server_id)