This commit is contained in:
parent
12ad5ced49
commit
1398c6040a
@ -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/
|
// CreateServerFromMeowUrl creates a server from a meow url, ex : meow://mylogin:mypassword@https://my.meowserver.example:8443/meow/
|
||||||
func CreateServerFromMeowUrl(meowurl string) *Server {
|
func CreateServerFromMeowUrl(meowurl string) *Server {
|
||||||
uid := strings.Split(meowurl, "://")[1]
|
uid := meowurl[7:]
|
||||||
return CreateServerFromUid(uid)
|
return CreateServerFromUid(uid)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ func CreateServerFromInvitationLink(meowurl string) *Server {
|
|||||||
meowurlTable := strings.Split(meowurl, "/")
|
meowurlTable := strings.Split(meowurl, "/")
|
||||||
// join all elements with / except the last one
|
// join all elements with / except the last one
|
||||||
uid := strings.Join(meowurlTable[:len(meowurlTable)-1], "/")
|
uid := strings.Join(meowurlTable[:len(meowurlTable)-1], "/")
|
||||||
return CreateServerFromUid(uid)
|
return CreateServerFromMeowUrl(uid)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetServerCard returns a server card from a server
|
// GetServerCard returns a server card from a server
|
||||||
|
Loading…
Reference in New Issue
Block a user