Skip to content

Commit

Permalink
name change
Browse files Browse the repository at this point in the history
  • Loading branch information
akiyatomohiro committed Feb 22, 2025
1 parent f158397 commit d245090
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion server/api/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ REEARTH_FLOW_DEV=false

# Host configurations
REEARTH_FLOW_HOST=https://localhost:8080
REEARTH_DASHBOARD_HOST=http://localhost:8090
REEARTH_ACCOUNTS_HOST=http://localhost:8090

# Local Auth serv
REEARTH_FLOW_AUTH0_DOMAIN=https://example.auth0.com
Expand Down
2 changes: 1 addition & 1 deletion server/api/internal/app/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type (
Port string `default:"8080" envconfig:"PORT"`
ServerHost string `pp:",omitempty"`
Host string `default:"http://localhost:8080"`
DashboardHost string `envconfig:"REEARTH_DASHBOARD_HOST" pp:",omitempty"`
AccountsHost string `envconfig:"REEARTH_ACCOUNTS_HOST" pp:",omitempty"`
Host_Web string `pp:",omitempty"`
Dev bool `pp:",omitempty"`
DB string `default:"mongodb://localhost"`
Expand Down
10 changes: 5 additions & 5 deletions server/api/internal/app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ func Start(debug bool, version string) {
repos, gateways, acRepos, acGateways := initReposAndGateways(ctx, conf, debug)

// PermissionChecker
if conf.DashboardHost == "" {
log.Fatalf("dashboard host configuration is required")
if conf.AccountsHost == "" {
log.Fatalf("accounts host configuration is required")
}
if _, err := url.Parse(conf.DashboardHost); err != nil {
log.Fatalf("invalid dashboard host URL: %v", err)
if _, err := url.Parse(conf.AccountsHost); err != nil {
log.Fatalf("invalid accounts host URL: %v", err)
}
permissionChecker := cerbosClient.NewPermissionChecker(rbac.ServiceName, conf.DashboardHost)
permissionChecker := cerbosClient.NewPermissionChecker(rbac.ServiceName, conf.AccountsHost)
if permissionChecker == nil {
log.Fatalf("failed to initialize permission checker")
}
Expand Down
2 changes: 1 addition & 1 deletion server/api/internal/usecase/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/reearth/reearthx/account/accountusecase"
)

// TODO: After migrating to Cerbos for permission management and modifying reearthx and reearth-dashboard interfaces,
// TODO: After migrating to Cerbos for permission management and modifying reearthx and reearth-accounts interfaces,
// this file and all its usages will be deleted.
type Operator struct {
AcOperator *accountusecase.Operator
Expand Down

0 comments on commit d245090

Please sign in to comment.