diff mod_client_management/mod_client_management.lua @ 5370:d9d52ad8c1ae

mod_client_management: Fix type confusion client_selector : string, not some sort of table?
author Kim Alvefur <zash@zash.se>
date Tue, 25 Apr 2023 22:12:02 +0200
parents 1a58a11407ac
children b2d51c6ae89a
line wrap: on
line diff
--- a/mod_client_management/mod_client_management.lua	Tue Apr 25 22:06:08 2023 +0200
+++ b/mod_client_management/mod_client_management.lua	Tue Apr 25 22:12:02 2023 +0200
@@ -277,8 +277,8 @@
 end
 
 function revoke_client_access(username, client_selector)
-	if client_selector.id then
-		local c_type, c_id = client_selector.id:match("^(%w+)/(.+)$");
+	if client_selector then
+		local c_type, c_id = client_selector:match("^(%w+)/(.+)$");
 		if c_type == "client" then
 			local client = client_store:get_key(username, c_id);
 			if not client then