From da3b39fbc62523e7ec3519ac05b04dd311f49694 Mon Sep 17 00:00:00 2001 From: Reindert Vetter Date: Tue, 7 Sep 2021 00:20:10 +0200 Subject: [PATCH] disable mysql by default --- app/http/controllers/homepage.go | 9 ++------- config/database.go | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/app/http/controllers/homepage.go b/app/http/controllers/homepage.go index 16d050b..35add1e 100644 --- a/app/http/controllers/homepage.go +++ b/app/http/controllers/homepage.go @@ -3,15 +3,10 @@ package controllers import ( "github.com/confetti-framework/contract/inter" "github.com/confetti-framework/foundation/http/outcome" + "src/resources/views" ) // Homepage contains the code responsible for generating the home page. func Homepage(request inter.Request) inter.Response { - db := request.App().Db() - databases := db.Query("SHOW databases;") - if databases.Empty() { - - return outcome.Html("Database empty") - } - return outcome.Html("Databases: "+databases.First().String()) + return outcome.Html(views.Homepage(request.App(), "Confetti", "Let's be creative!")) } diff --git a/config/database.go b/config/database.go index 1aef959..c603166 100644 --- a/config/database.go +++ b/config/database.go @@ -2,9 +2,7 @@ package config import ( "github.com/confetti-framework/contract/inter" - "github.com/confetti-framework/foundation/db" "github.com/confetti-framework/support/env" - "time" ) var Database = struct { @@ -36,6 +34,7 @@ var Database = struct { */ Connections: map[string]inter.Connection{ + /* "mysql": &db.MySQL{ Host: env.StringOr("DB_HOST", "127.0.0.1"), Port: env.IntOr("DB_PORT", 3306), @@ -44,6 +43,7 @@ var Database = struct { Password: env.StringOr("DB_PASSWORD", ""), QueryTimeout: 10 * time.Second, }, + */ /* "postgresql": &db.PostgreSQL{