Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
9 changes: 9 additions & 0 deletions pkg/app/database_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package app

import (
"context"
"testing"

"github.com/julwrites/BotPlatform/pkg/def"
Expand All @@ -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"

Expand Down
1 change: 1 addition & 0 deletions pkg/app/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
12 changes: 6 additions & 6 deletions pkg/utils/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading