fix(allowlist): 唤醒名单可查看、可取消或恢复唤醒权限,换主人时清空
This commit is contained in:
23 files changed
+1190
-32
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import type {
|
||||
AccessResult,
|
||||
AllowlistEntry,
|
||||
ApiError,
|
||||
AutostartPolicy,
|
||||
BackupView,
|
||||
@@ -461,6 +462,18 @@ export const api = rejectingSync({
|
||||
accessKick: (name: string, player: string) =>
|
||||
request<KickResult>("POST", urlPath`/servers/${name}/access/kick`, { player }),
|
||||
|
||||
// Wake allowlist (GET/PUT /servers/{name}/allowlist): Felis's own record of who
|
||||
// may wake the server under autostartPolicy "allowlist". Owner-or-admin gated,
|
||||
// and unlike the access routes above it needs no running server.
|
||||
serverAllowlist: (name: string) =>
|
||||
request<{ server: string; entries: AllowlistEntry[] }>(
|
||||
"GET",
|
||||
urlPath`/servers/${name}/allowlist`,
|
||||
).then((r) => r.entries ?? []),
|
||||
|
||||
setAllowlistWake: (name: string, mcUUID: string, canWake: boolean) =>
|
||||
request<void>("PUT", urlPath`/servers/${name}/allowlist/${mcUUID}`, { can_wake: canWake }),
|
||||
|
||||
accessLuckPermsInfo: (name: string, player: string) =>
|
||||
request<{
|
||||
player: string;
|
||||
|
||||
Reference in new issue
Block a user