add tysc handlers to kontor-gin
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"kontor-api-gin/internal/models"
|
||||
"log/slog"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
@@ -26,7 +27,7 @@ var checkCmd = &cobra.Command{
|
||||
slog.Info("Verbosity level", "level", verbose)
|
||||
var login LoginResponse
|
||||
client := resty.New()
|
||||
res, err := client.R().
|
||||
_, err := client.R().
|
||||
SetBody(Login{
|
||||
Email: "thomas.peetz@thpeetz.de",
|
||||
Password: "admin",
|
||||
@@ -38,14 +39,23 @@ var checkCmd = &cobra.Command{
|
||||
slog.Info("Health", "error", err.Error())
|
||||
}
|
||||
slog.Info("health", "token", login.Token)
|
||||
res, err = client.R().
|
||||
|
||||
type ExportData struct {
|
||||
Sport []models.SportDTO `json:"sport"`
|
||||
Comic []models.ComicDTO `json:"comic"`
|
||||
}
|
||||
|
||||
var comics []models.ComicDTO
|
||||
_, err = client.R().
|
||||
SetAuthToken(login.Token).
|
||||
SetHeader("Accept", "application/json").
|
||||
SetResult(&comics).
|
||||
Get("http://127.0.0.1:8550/api/v1/comics/comics")
|
||||
if err != nil {
|
||||
slog.Info("comics", "error", err.Error())
|
||||
}
|
||||
slog.Info("comics", "res", res)
|
||||
// slog.Info("comics", "res", comics)
|
||||
|
||||
defer client.Close()
|
||||
|
||||
slog.Info("kontor.check_kontor.check_duplicate_links")
|
||||
|
||||
Reference in New Issue
Block a user