fix: add network.interface validation
This commit is contained in:
parent
2169e4cfc1
commit
95fbc5167a
@ -56,13 +56,14 @@ const parseSegmentNetwork = flow(
|
||||
new Error(["network required", `in: ${JSON.stringify(o)}`].join("\n"))
|
||||
),
|
||||
Either.flatMap((n) =>
|
||||
"interface" in n
|
||||
("interface" in n && n.interface === "public") || n.interface === "local"
|
||||
? Either.right(n)
|
||||
: Either.left(
|
||||
new Error(
|
||||
["network.interface required", `in: ${JSON.stringify(n)}`].join(
|
||||
"\n"
|
||||
)
|
||||
[
|
||||
"network.interface required, and must be 'public' or 'local'",
|
||||
`in: ${JSON.stringify(n)}`,
|
||||
].join("\n")
|
||||
)
|
||||
)
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user