rename index template to app
This commit is contained in:
parent
7f3901ddc2
commit
294c6221aa
3 changed files with 4 additions and 6 deletions
|
@ -20,7 +20,7 @@ func UIIndex(ctx context.Context, bottinClient *bottin.APIClient, dbClient *DBCl
|
||||||
Result string
|
Result string
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.Render(http.StatusOK, "index", func() (d data) {
|
return c.Render(http.StatusOK, "app", func() (d data) {
|
||||||
if err := func() error {
|
if err := func() error {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
|
@ -78,7 +78,7 @@ func UICreateTransaction(ctx context.Context, cfg Config, bottinClient *bottin.A
|
||||||
//BottinHealth bottin.ReadHealthResponse
|
//BottinHealth bottin.ReadHealthResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.Render(http.StatusOK, "index", func() (d data) {
|
return c.Render(http.StatusOK, "app", func() (d data) {
|
||||||
if err := func() error {
|
if err := func() error {
|
||||||
if bottinClient == nil {
|
if bottinClient == nil {
|
||||||
return fmt.Errorf("Cannot operate on nil *bottin.APIClient")
|
return fmt.Errorf("Cannot operate on nil *bottin.APIClient")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{ define "index" }}
|
{{ define "app" }}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
|
@ -114,6 +114,7 @@ button {
|
||||||
|
|
||||||
{{ if .Error }}<p class="result">Erreur: {{ .Error }}</p>{{ end }}
|
{{ if .Error }}<p class="result">Erreur: {{ .Error }}</p>{{ end }}
|
||||||
{{ if .Result }}<p class="result">{{ .Result }}</p>{{ end }}
|
{{ if .Result }}<p class="result">{{ .Result }}</p>{{ end }}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -1,3 +0,0 @@
|
||||||
{{ define "test" }}
|
|
||||||
{{ . }}
|
|
||||||
{{ end }}
|
|
Loading…
Reference in a new issue