fix: resolve lint errors from phase 32/33/34 execution
Auto-fixed formatting issues and removed unused imports introduced by background execution agents across currency, i18n, and sharing code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,8 +12,7 @@ const app = new Hono();
|
||||
app.get("/:globalItemId", async (c) => {
|
||||
const db = c.get("db");
|
||||
const globalItemId = Number(c.req.param("globalItemId"));
|
||||
if (Number.isNaN(globalItemId))
|
||||
return c.json({ error: "Invalid ID" }, 400);
|
||||
if (Number.isNaN(globalItemId)) return c.json({ error: "Invalid ID" }, 400);
|
||||
|
||||
const market = c.req.query("market");
|
||||
const stats = await getCommunityPriceStats(db, globalItemId, market);
|
||||
|
||||
@@ -8,7 +8,7 @@ app.get("/", async (c) => {
|
||||
try {
|
||||
const rates = await getExchangeRates();
|
||||
return c.json(rates);
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
return c.json({ error: "Exchange rates unavailable" }, 503);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -25,8 +25,7 @@ app.post(
|
||||
async (c) => {
|
||||
const db = c.get("db");
|
||||
const globalItemId = Number(c.req.param("id"));
|
||||
if (Number.isNaN(globalItemId))
|
||||
return c.json({ error: "Invalid ID" }, 400);
|
||||
if (Number.isNaN(globalItemId)) return c.json({ error: "Invalid ID" }, 400);
|
||||
|
||||
const data = c.req.valid("json");
|
||||
const result = await upsertMarketPrice(db, {
|
||||
|
||||
@@ -16,9 +16,7 @@ export async function validateOwnership(
|
||||
const [row] = await db
|
||||
.select({ count: sql<number>`COUNT(*)` })
|
||||
.from(items)
|
||||
.where(
|
||||
and(eq(items.userId, userId), eq(items.globalItemId, globalItemId)),
|
||||
);
|
||||
.where(and(eq(items.userId, userId), eq(items.globalItemId, globalItemId)));
|
||||
return (row?.count ?? 0) > 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user