diff --git a/backend/pkg/spot/service/public_key.go b/backend/pkg/spot/service/public_key.go index 36b0ddf83..96ff78c0f 100644 --- a/backend/pkg/spot/service/public_key.go +++ b/backend/pkg/spot/service/public_key.go @@ -44,7 +44,7 @@ func (k *keysImpl) Set(spotID, expiration uint64, user *auth.User) (*Key, error) now := time.Now() if expiration == 0 { - sql := `UPDATE spots_keys SET expired_at = $1, expiration = 0 WHERE spot_id = $2` + sql := `UPDATE spots.keys SET expired_at = $1, expiration = 0 WHERE spot_id = $2` if err := k.conn.Exec(sql, now, spotID); err != nil { k.log.Error(context.Background(), "failed to set key: %v", err) return nil, fmt.Errorf("key not updated") diff --git a/backend/pkg/spot/service/spot.go b/backend/pkg/spot/service/spot.go index aa4e51216..dc2765d19 100644 --- a/backend/pkg/spot/service/spot.go +++ b/backend/pkg/spot/service/spot.go @@ -367,7 +367,7 @@ func (s *spotsImpl) GetStatus(user *auth.User, spotID uint64) (string, error) { case spotID == 0: return "", fmt.Errorf("spot id is required") } - sql := `SELECT status FROM spots WHERE spot_id = $1 AND tenant_id = $2 AND deleted_at IS NULL` + sql := `SELECT status FROM spots.spots WHERE spot_id = $1 AND tenant_id = $2 AND deleted_at IS NULL` var status string if err := s.pgconn.QueryRow(sql, spotID, user.TenantID).Scan(&status); err != nil { return "", err