fix(nfs): reconcile clients[i].advanced type mismatch (object vs string)

backend: db.NFSClient.Advanced is db.NFSAdvanced (struct → JSON object)
handler: nfsClientRequest.Advanced was string → now db.NFSAdvanced
frontend: api.ts NFSClient.advanced string → NFSAdvanced (object)
frontend: Nfs.tsx updated to work with object advanced per host

Without this fix, editing an existing NFS export with per-host options
(loaded from DB via migration 0005) would 400 on PUT because the
backend expected a string but received a JSON object.
This commit is contained in:
2026-07-06 11:45:44 -04:00
parent 512feaffd7
commit 59505b443f
3 changed files with 40 additions and 41 deletions
+10 -1
View File
@@ -15,7 +15,16 @@ export interface NFSClient {
async: boolean;
root_squash: boolean;
subtree_check: boolean;
advanced: string;
advanced: NFSAdvanced;
}
export interface NFSAdvanced {
all_squash: boolean;
secure: boolean;
wdelay: boolean;
hide: boolean;
crossmnt: boolean;
[key: string]: boolean;
}
export interface NFSExport {