summaryrefslogtreecommitdiff
path: root/xmake/modules/private/service/rm_user.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-13 00:47:27 +0800
committerruki <[email protected]>2022-05-13 00:47:27 +0800
commitb7e4be37dc71c3d0d5217f32b0960bc042455d30 (patch)
treeff503c407ea4e0b98a2487d3d079cd4eda324e0e /xmake/modules/private/service/rm_user.lua
parent9287baf136e9c347da35d27cd7c6c1c1c54b89a2 (diff)
rewrite service config
Diffstat (limited to 'xmake/modules/private/service/rm_user.lua')
-rw-r--r--xmake/modules/private/service/rm_user.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/xmake/modules/private/service/rm_user.lua b/xmake/modules/private/service/rm_user.lua
index c1ed7a7fb..b68ff4f7b 100644
--- a/xmake/modules/private/service/rm_user.lua
+++ b/xmake/modules/private/service/rm_user.lua
@@ -24,7 +24,7 @@ import("core.base.base64")
import("core.base.bytes")
import("core.base.hashset")
import("private.service.service")
-import("private.service.config")
+import("private.service.server_config", {alias = "config"})
function main(user)
assert(user, "empty user name!")
@@ -41,12 +41,11 @@ function main(user)
-- save to configs
local configs = assert(config.configs(), "configs not found!")
- configs.server = configs.server or {}
- configs.server.tokens = configs.server.tokens or {}
- local tokenset = hashset.from(configs.server.tokens)
+ configs.tokens = configs.tokens or {}
+ local tokenset = hashset.from(configs.tokens)
if tokenset:has(token) then
tokenset:remove(token)
- configs.server.tokens = tokenset:to_array()
+ configs.tokens = tokenset:to_array()
else
cprint("User ${bright}%s${clear} not found!", user)
return