ci: trigga på master + formatfix inför Gitea Actions
CI / Typecheck, test & build (push) Failing after 2s
CI / Typecheck, test & build (push) Failing after 2s
This commit is contained in:
@@ -4,11 +4,13 @@ import { schema } from "@app/database";
|
||||
import { z } from "zod";
|
||||
import { buildReconciliationCandidates, classifyExpiry, computeTrust } from "@app/inventory-engine";
|
||||
import { errors, parse } from "../lib/errors.js";
|
||||
import { getActiveDecayProfile, requireActiveHousehold, requireMembership, trackProductAnalytics } from "../lib/helpers.js";
|
||||
import {
|
||||
reconciliationResolveInputSchema,
|
||||
reconciliationStartInputSchema,
|
||||
} from "@app/validation";
|
||||
getActiveDecayProfile,
|
||||
requireActiveHousehold,
|
||||
requireMembership,
|
||||
trackProductAnalytics,
|
||||
} from "../lib/helpers.js";
|
||||
import { reconciliationResolveInputSchema, reconciliationStartInputSchema } from "@app/validation";
|
||||
import { inventoryReconciliationCompleted, inventoryReconciliationStarted } from "@app/analytics";
|
||||
|
||||
/** Quick Reconciliation (Fas 2 §5.4) */
|
||||
@@ -63,10 +65,15 @@ export async function reconciliationRoutes(app: FastifyInstance) {
|
||||
);
|
||||
|
||||
if (upcomingEntries.length > 0) {
|
||||
const recipeIds = [...new Set(upcomingEntries.map((m) => m.recipeId).filter(Boolean))] as string[];
|
||||
const recipeIds = [
|
||||
...new Set(upcomingEntries.map((m) => m.recipeId).filter(Boolean)),
|
||||
] as string[];
|
||||
if (recipeIds.length > 0) {
|
||||
const ingredients = await app.db
|
||||
.select({ recipeId: schema.recipeIngredients.recipeId, canonicalId: schema.recipeIngredients.canonicalIngredientId })
|
||||
.select({
|
||||
recipeId: schema.recipeIngredients.recipeId,
|
||||
canonicalId: schema.recipeIngredients.canonicalIngredientId,
|
||||
})
|
||||
.from(schema.recipeIngredients)
|
||||
.where(inArray(schema.recipeIngredients.recipeId, recipeIds));
|
||||
for (const ing of ingredients) {
|
||||
@@ -255,7 +262,11 @@ export async function reconciliationRoutes(app: FastifyInstance) {
|
||||
req.userId,
|
||||
inventoryReconciliationCompleted({
|
||||
householdId,
|
||||
properties: { itemId: params.itemId, action: input.action, hadAdjustment: quantityChange !== 0 },
|
||||
properties: {
|
||||
itemId: params.itemId,
|
||||
action: input.action,
|
||||
hadAdjustment: quantityChange !== 0,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user