add config values for token retrieval
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
This commit is contained in:
@@ -118,16 +118,18 @@ func GetToken(client *resty.Client, server config.Server) (token string) {
|
||||
|
||||
_, err := client.R().
|
||||
SetBody(Login{
|
||||
Email: "thomas.peetz@thpeetz.de",
|
||||
Password: "admin",
|
||||
Email: server.Username,
|
||||
Password: server.Password,
|
||||
}).
|
||||
SetHeader("Accept", "application/json").
|
||||
SetResult(&login).
|
||||
Post("http://127.0.0.1:8550/api/login")
|
||||
Post(fmt.Sprintf("%s/api/login", server.Url))
|
||||
if err != nil {
|
||||
slog.Info("Health", "error", err.Error())
|
||||
}
|
||||
slog.Info("health", "token", login.Token)
|
||||
if config.Verbose > 2 {
|
||||
slog.Info("login", "token", login.Token)
|
||||
}
|
||||
return login.Token
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user