moewurl bugfixes
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc 2024-03-26 15:15:41 +01:00
parent 12ad5ced49
commit 1398c6040a

View File

@ -55,7 +55,7 @@ func CreateServerFromUid(uid string) *Server {
// CreateServerFromMeowUrl creates a server from a meow url, ex : meow://mylogin:mypassword@https://my.meowserver.example:8443/meow/
func CreateServerFromMeowUrl(meowurl string) *Server {
uid := strings.Split(meowurl, "://")[1]
uid := meowurl[7:]
return CreateServerFromUid(uid)
}
@ -65,7 +65,7 @@ func CreateServerFromInvitationLink(meowurl string) *Server {
meowurlTable := strings.Split(meowurl, "/")
// join all elements with / except the last one
uid := strings.Join(meowurlTable[:len(meowurlTable)-1], "/")
return CreateServerFromUid(uid)
return CreateServerFromMeowUrl(uid)
}
// GetServerCard returns a server card from a server