Merge pull request 'Permettre exécution sans base de donnée' (#152) from change/allow-running-without-db into main
Reviewed-on: #152
This commit is contained in:
commit
f6d9d5f443
2 changed files with 25 additions and 20 deletions
|
@ -48,17 +48,18 @@ var serverCmd = &cobra.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
mediaClient, err := media.NewMediaClientFromViper()
|
mediaClient, err := media.NewMediaClientFromViper()
|
||||||
if err != nil {
|
switch err != nil {
|
||||||
log.Fatal(err)
|
case true:
|
||||||
|
log.Printf("media.NewMediaClientFromViper error: %s", err)
|
||||||
|
case false:
|
||||||
|
new_buckets, err := mediaClient.Seed()
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("(*media.MediaClient).Seed error: %s", err)
|
||||||
|
} else {
|
||||||
|
log.Printf("Seeded %d buckets.\n", len(new_buckets))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
new_buckets, err := mediaClient.Seed()
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Printf("Seeded %d buckets.\n", len(new_buckets))
|
|
||||||
|
|
||||||
RunServer()
|
RunServer()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,17 +12,21 @@
|
||||||
<div class="wrapper documentationWrapper">
|
<div class="wrapper documentationWrapper">
|
||||||
<h1 class="heading1">Documentation</h1>
|
<h1 class="heading1">Documentation</h1>
|
||||||
<p>
|
<p>
|
||||||
{{ range .Data.Buckets }}
|
{{ if not .Data.Buckets }}
|
||||||
{{ $bucket_name := .Name }}
|
Documentation non-accessible pour l'instant, merci de votre patience
|
||||||
{{ $bucket_display_name := .DisplayName }}
|
{{ else }}
|
||||||
<details class="documentationCategorie">
|
{{ range .Data.Buckets }}
|
||||||
<summary class="documentationDescription">{{ $bucket_display_name }}</summary>
|
{{ $bucket_name := .Name }}
|
||||||
<ul class="documentationListe">
|
{{ $bucket_display_name := .DisplayName }}
|
||||||
{{ range .Documents }}
|
<details class="documentationCategorie">
|
||||||
<a class ="documentationLien" href="/public/documentation/{{ $bucket_name }}/{{ . }}"><li class="documentationDocument">{{ . }}</li></a>
|
<summary class="documentationDescription">{{ $bucket_display_name }}</summary>
|
||||||
{{ end}}
|
<ul class="documentationListe">
|
||||||
</ul>
|
{{ range .Documents }}
|
||||||
</details>
|
<a class ="documentationLien" href="/public/documentation/{{ $bucket_name }}/{{ . }}"><li class="documentationDocument">{{ . }}</li></a>
|
||||||
|
{{ end}}
|
||||||
|
</ul>
|
||||||
|
</details>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
|
Loading…
Reference in a new issue