Ignore:
Timestamp:
01/23/26 18:27:06 (6 months ago)
Author:
Tome <gjorgievtome@…>
Branches:
main
Children:
ad211d1
Parents:
41a2f81
Message:

Allow adding multiple components per build

File:
1 edited

Legend:

Unmodified
Added
Removed
  • database/drizzle/queries/components.ts

    r41a2f81 rb0685a8  
    959959        if(!build || build.isApproved) return null;
    960960
    961         const existing = await tx
    962             .select()
    963             .from(buildComponentsTable)
    964             .where(
    965                 and(
    966                     eq(buildComponentsTable.buildId, buildId),
    967                     eq(buildComponentsTable.componentId, componentId)
    968                 )
    969             )
    970             .limit(1);
    971 
    972         if (existing.length) return null;
    973 
    974961        await tx
    975962            .insert(buildComponentsTable)
Note: See TracChangeset for help on using the changeset viewer.