add server configuration
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s

This commit is contained in:
Thomas Peetz
2026-10-08 17:40:17 +02:00
parent 7116869b42
commit ffa4786113
11 changed files with 292 additions and 97 deletions
+3 -3
View File
@@ -25,13 +25,13 @@ var addLinksCmd = &cobra.Command{
slog.Warn("add links failed", "error", err)
os.Exit(1)
}
var login LoginResponse
client := resty.New()
token := helpers.GetToken(client)
for _, line := range lines {
lofiAdd := models.MediaLofiAdd{Url: line}
client := resty.New()
PostJSON(client, fmt.Sprintf("%s/%s/%s", server, "api", "login"), &login)
response, err := client.R().
SetBody(lofiAdd).
SetAuthToken(token).
SetHeader("Accept", "application/json").
Post("http://localhost:8550/api/v1/media/lofi")
if err != nil {