Files
huangguo_server/app/appg/ai_callback.go
T
rootandClaude Opus 5 8679200f41 Initial commit
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 13:57:10 +08:00

15 lines
451 B
Go

package appg
import (
"errors"
"strings"
)
// AICallbackURL returns the externally reachable Web callback URL for AI jobs.
func AICallbackURL(path string) (string, error) {
if Conf == nil || strings.TrimSpace(Conf.URL.AiImageToVideoCallbackUrl) == "" {
return "", errors.New("ai callback url is not configured")
}
return strings.TrimRight(strings.TrimSpace(Conf.URL.AiImageToVideoCallbackUrl), "/") + "/" + strings.TrimLeft(path, "/"), nil
}