From c84238800bb743181582f043ece9b44fef233c95 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Tue, 7 Mar 2023 18:51:06 +0800 Subject: Refactor `setting.Database.UseXXX` to methods (#23354) Replace #23350. Refactor `setting.Database.UseMySQL` to `setting.Database.Type.IsMySQL()`. To avoid mismatching between `Type` and `UseXXX`. This refactor can fix the bug mentioned in #23350, so it should be backported. --- routers/web/healthcheck/check.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers/web/healthcheck') diff --git a/routers/web/healthcheck/check.go b/routers/web/healthcheck/check.go index 1142a0aec5..e11dd2aca2 100644 --- a/routers/web/healthcheck/check.go +++ b/routers/web/healthcheck/check.go @@ -100,7 +100,7 @@ func checkDatabase(checks checks) status { st.Time = getCheckTime() } - if setting.Database.UseSQLite3 && st.Status == pass { + if setting.Database.Type.IsSQLite3() && st.Status == pass { if !setting.EnableSQLite3 { st.Status = fail st.Time = getCheckTime() -- cgit v1.2.3