diff --git a/internal/db/admin_setting.go b/internal/db/admin_setting.go index 88f4ccd..d8586ee 100644 --- a/internal/db/admin_setting.go +++ b/internal/db/admin_setting.go @@ -19,7 +19,7 @@ const ( func GetSetting(key string) (string, error) { var setting AdminSetting - err := db.Where("key = ?", key).First(&setting).Error + err := db.Where("`key` = ?", key).First(&setting).Error return setting.Value, err } diff --git a/internal/ssh/git_ssh.go b/internal/ssh/git_ssh.go index 3c99994..f2ba6ab 100644 --- a/internal/ssh/git_ssh.go +++ b/internal/ssh/git_ssh.go @@ -41,6 +41,7 @@ func runGitCommand(ch ssh.Channel, gitCmd string, key string, ip string) error { allowUnauthenticated, err := auth.ShouldAllowUnauthenticatedGistAccess(db.AuthInfo{}, true) if err != nil { + errorSsh("Failed to get auth info", err) return errors.New("internal server error") }