Produit minimal viable #1
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
|
||||
}
|
||||
|
||||
return c.Render(http.StatusOK, "index", func() (d data) {
|
||||
return c.Render(http.StatusOK, "app", func() (d data) {
|
||||
if err := func() error {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
|
@ -78,7 +78,7 @@ func UICreateTransaction(ctx context.Context, cfg Config, bottinClient *bottin.A
|
|||
//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 bottinClient == nil {
|
||||
return fmt.Errorf("Cannot operate on nil *bottin.APIClient")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{ define "index" }}
|
||||
{{ define "app" }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
|
@ -114,6 +114,7 @@ button {
|
|||
|
||||
{{ if .Error }}<p class="result">Erreur: {{ .Error }}</p>{{ end }}
|
||||
{{ if .Result }}<p class="result">{{ .Result }}</p>{{ end }}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,3 +0,0 @@
|
|||
{{ define "test" }}
|
||||
{{ . }}
|
||||
{{ end }}
|
Loading…
Reference in a new issue