feat: sync deployed v1.0.0-rc.38-custom.42
Sync production source including routing, billing, Astra detection and public uptime. Update custom build instructions and license packaging.
This commit is contained in:
1 parent
aa6c3f50f4
commit
ceddfd3d6b
828 files changed
+122253
-13702
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"github.com/tidwall/gjson"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
func manxueArtworkURL(result gjson.Result) string {
|
||||
for _, key := range []string{"share_url", "public_url", "result_url", "result.share_url", "result.public_url"} {
|
||||
raw := result.Get(key).String()
|
||||
u, err := url.Parse(raw)
|
||||
if err == nil && u.Scheme == "https" && u.Host == "manxue.ai" && u.User == nil && u.Query().Get("result") != "" {
|
||||
return u.String()
|
||||
}
|
||||
}
|
||||
id := result.Get("public_id").String()
|
||||
if id == "" {
|
||||
id = result.Get("result.public_id").String()
|
||||
}
|
||||
if id == "" && result.Get("public").Bool() {
|
||||
id = result.Get("result.id").String()
|
||||
}
|
||||
if id == "" {
|
||||
return ""
|
||||
}
|
||||
return "https://manxue.ai/?" + url.Values{"result": {id}}.Encode()
|
||||
}
|
||||
Reference in new issue
Block a user