these need to always be enabled anyway... (#34)

This commit is contained in:
Michael Quigley 2023-07-26 16:25:52 -04:00
parent 86b1e3cde7
commit 1130ff8006
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 8 additions and 0 deletions

View File

@ -9,6 +9,10 @@ import (
)
func CreateAccess(root env_core.Root, request *AccessRequest) (*Access, error) {
if !root.IsEnabled() {
return nil, errors.New("environment is not enabled; enable with 'zrok enable' first!")
}
out := share.NewAccessParams()
out.Body = &rest_model_zrok.AccessRequest{
ShrToken: request.ShareToken,

View File

@ -10,6 +10,10 @@ import (
)
func CreateShare(root env_core.Root, request *ShareRequest) (*Share, error) {
if !root.IsEnabled() {
return nil, errors.New("environment is not enabled; enable with 'zrok enable' first!")
}
var err error
var out *share.ShareParams