fix removal of SetURI on user/group
Some checks failed
Declarative Tests / test (push) Waiting to run
Lint / golangci-lint (push) Has been cancelled

This commit is contained in:
Matthew Rich 2024-10-16 10:51:58 -07:00
parent 8feb7b8d56
commit 9943452ff9
3 changed files with 3 additions and 7 deletions

View File

@ -82,7 +82,7 @@ func (c *Common) URIPath() string {
}
func (c *Common) URI() folio.URI {
slog.Info("Common.URI", "parsed", c.parsedURI, "debug", debug.Stack())
slog.Info("Common.URI", "parsed", c.parsedURI)
return folio.URI(c.parsedURI.String())
}

View File

@ -83,7 +83,6 @@ func FindSystemGroupType() GroupType {
}
func (g *Group) Init(u data.URIParser) error {
var initializeURI folio.URI
if u == nil {
u = folio.URI(g.URI()).Parse()
}
@ -97,8 +96,7 @@ func (g *Group) Init(u data.URIParser) error {
g.GroupType = GroupTypeGroupAdd
}
g.CreateCommand, g.ReadCommand, g.UpdateCommand, g.DeleteCommand = g.GroupType.NewCRUD()
initializeURI.SetURL(uri)
return g.SetURI(string(initializeURI))
return g.SetParsedURI(u)
}
func (g *Group) NormalizePath() error {

View File

@ -94,15 +94,13 @@ func FindSystemUserType() UserType {
}
func (u *User) Init(uri data.URIParser) error {
var initializeURI folio.URI
if uri == nil {
uri = folio.URI(u.URI()).Parse()
}
initializeURI.SetURL(uri.URL())
u.Name = uri.URL().Hostname()
u.UID = LookupUIDString(uri.URL().Hostname())
u.CreateCommand, u.ReadCommand, u.UpdateCommand, u.DeleteCommand = u.UserType.NewCRUD()
return u.SetURI(string(initializeURI))
return u.SetParsedURI(uri)
}
func (u *User) NormalizePath() error {