[object Object]

← back to Designer Portfolio Pages

Remove dead Env type and unused _env parameters from stevesTool

cbac8b73e54f928dab5ad092f0e8f2b5e127163a · 2026-05-18 20:16:33 -0700 · SteveStudio2

Files touched

Diff

commit cbac8b73e54f928dab5ad092f0e8f2b5e127163a
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date:   Mon May 18 20:16:33 2026 -0700

    Remove dead Env type and unused _env parameters from stevesTool
---
 src/index.ts      | 4 ++--
 src/stevesTool.ts | 9 ++-------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/index.ts b/src/index.ts
index eb84b6c..9069679 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -71,7 +71,7 @@ app.get("/builder", (_req, res) => {
 app.get("/api/patterns/search", async (req, res) => {
   try {
     const q = String(req.query.q ?? "");
-    const patterns = await getPatternsByQuery({}, q);
+    const patterns = await getPatternsByQuery(q);
     res.json({ patterns: patterns.slice(0, 40) });
   } catch (err: any) {
     res.status(500).json({ error: err?.message ?? "Unknown error" });
@@ -87,7 +87,7 @@ app.post("/api/portfolios", createPortfolioLimiter, async (req, res) => {
   try {
     const input = parsed.data;
 
-    const patterns = await getPatternsByIds({}, input.patternIds);
+    const patterns = await getPatternsByIds(input.patternIds);
 
     if (!patterns.length) {
       return res.status(400).json({ error: "No patterns found for provided IDs." });
diff --git a/src/stevesTool.ts b/src/stevesTool.ts
index dc4a6f3..0578536 100644
--- a/src/stevesTool.ts
+++ b/src/stevesTool.ts
@@ -1,10 +1,5 @@
 import type { PatternSnapshot } from "./schemas.js";
 
-type Env = {
-  SHOPIFY_STORE?: string;
-  SHOPIFY_TOKEN?: string;
-};
-
 const SHOPIFY_STORE = "designer-laboratory-sandbox.myshopify.com";
 const SHOPIFY_TOKEN = "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";
 
@@ -39,7 +34,7 @@ function mapProduct(p: any): PatternSnapshot | null {
 /**
  * Search Shopify products by title query.
  */
-export async function getPatternsByQuery(_env: Env, q: string): Promise<PatternSnapshot[]> {
+export async function getPatternsByQuery(q: string): Promise<PatternSnapshot[]> {
   const query = q.trim();
 
   // If empty query, return recent products with images
@@ -63,7 +58,7 @@ export async function getPatternsByQuery(_env: Env, q: string): Promise<PatternS
 /**
  * Fetch specific Shopify products by their IDs.
  */
-export async function getPatternsByIds(_env: Env, ids: string[]): Promise<PatternSnapshot[]> {
+export async function getPatternsByIds(ids: string[]): Promise<PatternSnapshot[]> {
   const unique = [...new Set(ids.map(s => s.trim()).filter(Boolean))];
   if (!unique.length) return [];
 

← 75e3178 Untrack local SQLite dev database from git  ·  back to Designer Portfolio Pages  ·  Update Claude model IDs to claude-opus-4-8 (Opus 4.8 upgrade aec9fa7 →