1
0
Fork 0

[golang] implement sending the starting probe to a shipyard that sells other probes

This commit is contained in:
Julien Dessaux 2025-02-18 00:05:48 +01:00
parent bd2fb50c81
commit 3656b87b86
Signed by: adyxax
GPG key ID: F92E51B86E07177E
6 changed files with 98 additions and 61 deletions

View file

@ -45,8 +45,8 @@ func (db *DB) LoadWaypoint(symbol string) (*model.Waypoint, error) {
return &waypoint, nil
}
func (db *DB) LoadWaypointsInSystem(system *model.System) ([]model.Waypoint, error) {
rows, err := db.Query(`SELECT data FROM waypoints WHERE data->>'systemSymbol' = ?;`, system.Symbol)
func (db *DB) LoadWaypointsInSystem(systemSymbol string) ([]model.Waypoint, error) {
rows, err := db.Query(`SELECT data FROM waypoints WHERE data->>'systemSymbol' = ?;`, systemSymbol)
if err != nil {
return nil, fmt.Errorf("failed to query waypoints: %w", err)
}