Reapply "Add missing admin action files and navigation links"
This reverts commit 4d515bc400.
This commit is contained in:
1 parent
96ed768f14
commit
5b4228261a
338 files changed
+28143
-5948
No files matched your search
@@ -29,11 +29,17 @@ export async function saveVpn(formData: FormData): Promise<void> {
|
||||
// Toggle: an unchecked checkbox submits nothing, so absence === disabled.
|
||||
const enabled = String(formData.get("vpn_block_enabled") ?? "").trim() !== "";
|
||||
|
||||
const providerRaw = String(formData.get("vpn_provider") ?? "").trim().toLowerCase();
|
||||
const providerRaw = String(formData.get("vpn_provider") ?? "")
|
||||
.trim()
|
||||
.toLowerCase();
|
||||
const provider = ALLOWED_PROVIDERS.has(providerRaw) ? providerRaw : "none";
|
||||
|
||||
const apiKey = String(formData.get("vpn_api_key") ?? "").trim().slice(0, 255);
|
||||
const blockMessage = String(formData.get("vpn_block_message") ?? "").trim().slice(0, 255);
|
||||
const apiKey = String(formData.get("vpn_api_key") ?? "")
|
||||
.trim()
|
||||
.slice(0, 255);
|
||||
const blockMessage = String(formData.get("vpn_block_message") ?? "")
|
||||
.trim()
|
||||
.slice(0, 255);
|
||||
|
||||
try {
|
||||
await writeSetting(
|
||||
|
||||
Reference in new issue
Block a user