add templates media_links.html and media_detail.html for kontor-gin
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"kontor-api-gin/internal/api"
|
||||
"kontor-api-gin/internal/config"
|
||||
"log/slog"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
@@ -13,6 +15,16 @@ var importCmd = &cobra.Command{
|
||||
// Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
slog.Info("import kontor")
|
||||
slog.Info("Verbosity level", "level", config.Verbose)
|
||||
data := api.ExportData{}
|
||||
err := api.ReadJson(&data, config.FileName)
|
||||
if err != nil {
|
||||
slog.Info("Error importing data", "Error", err.Error())
|
||||
}
|
||||
slog.Info("importing MediaFiles", "count", len(data.MediaFile))
|
||||
slog.Info("importing MediaLofis", "count", len(data.MediaLoFi))
|
||||
slog.Info("importing MediaLofi", "media_lofi", data.MediaLoFi[0])
|
||||
slog.Info("import kontor finished")
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user