diff --git a/go.mod b/go.mod index 97b7001..621a93c 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( cloud.google.com/go/datastore v1.20.0 cloud.google.com/go/secretmanager v1.16.0 github.com/joho/godotenv v1.5.1 - github.com/julwrites/BotPlatform v0.0.0-20251211011140-ceb9fd2844a7 + github.com/julwrites/BotPlatform v0.0.0-20251211050425-935946c19bdb golang.org/x/net v0.43.0 google.golang.org/api v0.247.0 gopkg.in/yaml.v2 v2.4.0 diff --git a/go.sum b/go.sum index 713d295..e6e48cf 100644 --- a/go.sum +++ b/go.sum @@ -39,6 +39,8 @@ github.com/julwrites/BotPlatform v0.0.0-20251128175347-656700b2e4d4 h1:NeEPkJt4V github.com/julwrites/BotPlatform v0.0.0-20251128175347-656700b2e4d4/go.mod h1:PZT+yPLr4MrricOGOhXwiJCurNcGj36fD1jZOwMiuIk= github.com/julwrites/BotPlatform v0.0.0-20251211011140-ceb9fd2844a7 h1:v2a+Vzsy9v1+qrgpDA42t/ORWUoq9W/eMIhy5SMbAIc= github.com/julwrites/BotPlatform v0.0.0-20251211011140-ceb9fd2844a7/go.mod h1:PZT+yPLr4MrricOGOhXwiJCurNcGj36fD1jZOwMiuIk= +github.com/julwrites/BotPlatform v0.0.0-20251211050425-935946c19bdb h1:Y+JtPTaXzsfMlF+5/uqinPAB2bUElC0xzww1yJAFzgY= +github.com/julwrites/BotPlatform v0.0.0-20251211050425-935946c19bdb/go.mod h1:PZT+yPLr4MrricOGOhXwiJCurNcGj36fD1jZOwMiuIk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= diff --git a/pkg/app/database_integration_test.go b/pkg/app/database_integration_test.go index 5784f68..1aa2f02 100644 --- a/pkg/app/database_integration_test.go +++ b/pkg/app/database_integration_test.go @@ -1,6 +1,7 @@ package app import ( + "context" "testing" "github.com/julwrites/BotPlatform/pkg/def" @@ -22,6 +23,14 @@ func TestUserDatabaseIntegration(t *testing.T) { t.Skip("Skipping database test: GCLOUD_PROJECT_ID not set") } + // Verify client connectivity before proceeding + ctx := context.Background() + client := utils.OpenClient(&ctx, projectID) + if client == nil { + t.Skip("Skipping database test: Could not create Firestore client (check credentials)") + } + client.Close() + // Use a unique ID to avoid conflict with real users dummyID := "test-integration-user-DO-NOT-DELETE" diff --git a/pkg/app/version.go b/pkg/app/version.go index 2680665..69ae9c7 100644 --- a/pkg/app/version.go +++ b/pkg/app/version.go @@ -58,6 +58,7 @@ func SetVersion(env def.SessionData) def.SessionData { } env.Res.Affordances.Options = options + env.Res.Affordances.ColWidth = 3 env = utils.SetUserAction(env, CMD_VERSION) diff --git a/pkg/utils/user.go b/pkg/utils/user.go index b65daab..5dbae92 100644 --- a/pkg/utils/user.go +++ b/pkg/utils/user.go @@ -4,12 +4,12 @@ import "github.com/julwrites/BotPlatform/pkg/def" type User struct { Id string `datastore:"-"` // ID is the key - Username string `datastore:""` - Firstname string `datastore:""` - Lastname string `datastore:""` - Type string `datastore:""` - Action string `datastore:""` - Config string `datastore:""` + Username string `datastore:",noindex"` + Firstname string `datastore:",noindex"` + Lastname string `datastore:",noindex"` + Type string `datastore:",noindex"` + Action string `datastore:",noindex"` + Config string `datastore:",noindex"` } func GetUserFromSession(env def.SessionData) User {