Address #131 review: unknown link action is unknown, typed views, one share shape
Build image / build-and-push (push) Successful in 13s
Build image / build-and-push (push) Successful in 13s
- public_link checks the action before the confirmation gate, so an unknown action is told so instead of being asked to confirm nothing in particular (the 4/4 finding). - linkView is a struct like shareView; toShareView builds the five share results, and a fresh share is read back so it carries the person's name like every other path. - PublicShareURL trims a trailing slash off a hand-built base URL. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
@@ -94,7 +94,9 @@ func (s *Service) EnablePublicShareLink(ctx context.Context, actorID, gardenID i
|
||||
func (s *Service) PublicShareURL(token string) string {
|
||||
path := "/g/" + token
|
||||
if s.cfg != nil && s.cfg.BaseURL != "" {
|
||||
return s.cfg.BaseURL + path
|
||||
// config trims the trailing slash already; a Config built by hand
|
||||
// (tests, an embedder) may not have.
|
||||
return strings.TrimRight(s.cfg.BaseURL, "/") + path
|
||||
}
|
||||
return path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user