-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement environment update functionality in launchdevly ui #423
feat: Implement environment update functionality in launchdevly ui #423
Conversation
type Server struct { | ||
var _ StrictServerInterface = server{} | ||
|
||
type server struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be private
} | ||
|
||
func NewStrictServer() Server { | ||
return Server{} | ||
func NewStrictServer() StrictServerInterface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we want to return the interface not the struct
internal/dev_server/api/server.go
Outdated
return GetProjectsEnvironments404JSONResponse{}, nil | ||
} | ||
|
||
environments, err := project.Environments(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to refactor this off the project rep still. On my list
@@ -83,9 +83,9 @@ func (s Sqlite) UpdateProject(ctx context.Context, project model.Project) (bool, | |||
}() | |||
result, err := tx.ExecContext(ctx, ` | |||
UPDATE projects | |||
SET flag_state = ?, last_sync_time = ?, context=? | |||
SET flag_state = ?, last_sync_time = ?, context=?, source_environment_key=? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this intentionally left out? I saw some tests that might suggest so.
@@ -77,6 +78,7 @@ func (c LDClient) RunServer(ctx context.Context, serverParams ServerParams) { | |||
|
|||
func getDBPath() string { | |||
dbFilePath, err := xdg.StateFile("ldcli/dev_server.db") | |||
log.Printf("Using database at %s", dbFilePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useful for locally connecting to the db
https://www.loom.com/share/547246f3f0384ff69260bd744e9dd392