From bb9c9f19046a59f0570c7dca982732e9e1ed3528 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Thu, 2 Nov 2023 20:32:48 -0400 Subject: [PATCH] also return the request in the reservation so we can determine whether we need to provision a new share --- sdk/model.go | 5 +++-- sdk/share.go | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/model.go b/sdk/model.go index 4eed621b..87de9904 100644 --- a/sdk/model.go +++ b/sdk/model.go @@ -33,8 +33,9 @@ type ShareRequest struct { } type Share struct { - Token string `json:"token"` - FrontendEndpoints []string `json:"frontend_endpoints"` + Token string `json:"token"` + FrontendEndpoints []string `json:"frontend_endpoints"` + Request *ShareRequest `json:"request"` } type AccessRequest struct { diff --git a/sdk/share.go b/sdk/share.go index 45feb57f..7c9ac076 100644 --- a/sdk/share.go +++ b/sdk/share.go @@ -57,6 +57,7 @@ func CreateShare(root env_core.Root, request *ShareRequest) (*Share, error) { return &Share{ Token: in.Payload.ShrToken, FrontendEndpoints: in.Payload.FrontendProxyEndpoints, + Request: request, }, nil }