mirror of
https://github.com/openziti/zrok.git
synced 2024-11-24 17:13:51 +01:00
Moved defaultable params further down struct and capitlaized model params
This commit is contained in:
parent
21dc7dd5d5
commit
4f457155a7
@ -15,8 +15,6 @@ PUBLIC_SHARE_MODE: ShareMode = "public"
|
||||
|
||||
@dataclass
|
||||
class ShareRequest:
|
||||
Reserved: bool = false
|
||||
UniqueName: str = ""
|
||||
BackendMode: BackendMode
|
||||
ShareMode: ShareMode
|
||||
Target: str
|
||||
@ -25,6 +23,8 @@ class ShareRequest:
|
||||
OauthProvider: str = ""
|
||||
OauthEmailDomains: list[str] = field(default_factory=list[str])
|
||||
OauthAuthorizationCheckInterval: str = ""
|
||||
Reserved: bool = False
|
||||
UniqueName: str = ""
|
||||
|
||||
@dataclass
|
||||
class Share:
|
||||
|
@ -14,9 +14,9 @@ def CreateShare(root: Root, request: model.ShareRequest) -> model.Share:
|
||||
out = __newPublicShare(root, request)
|
||||
case _:
|
||||
raise Exception("unknown share mode " + request.ShareMode)
|
||||
out.reserved = request.reserved
|
||||
if request.reserved:
|
||||
out.unique_name = request.unique_name
|
||||
out.reserved = request.Reserved
|
||||
if request.Reserved:
|
||||
out.unique_name = request.UniqueName
|
||||
|
||||
if len(request.BasicAuth) > 0:
|
||||
out.auth_scheme = model.AUTH_SCHEME_BASIC
|
||||
|
Loading…
Reference in New Issue
Block a user