Commit b0075019 authored by Štěpán Dvorský's avatar Štěpán Dvorský
Browse files

feat(seed): seed images

parent 35f4092c
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ const seedComponents = async (tx: Prisma.TransactionClient) => {
      socketId: socket.get(obj['Socket'])!,
      manufacturerId: manufacturer.get(obj['Manufacturer'])!,
      integratedGraphicsId: integratedGraphics.get(obj['Integrated Graphics'])!,
      image: '', // TODO
      image: obj['image'],
    }))
  );

@@ -106,7 +106,7 @@ const seedComponents = async (tx: Prisma.TransactionClient) => {
      price: new Prisma.Decimal(data['$price']),
      manufacturerId: manufacturer.get(data['Manufacturer'])!,
      memoryGenerationId: memoryGeneration.get(data['Speed'].split('-')[0]!)!,
      image: '', // TODO
      image: data['image'],
    }))
  );

@@ -145,7 +145,7 @@ const seedComponents = async (tx: Prisma.TransactionClient) => {
      chipsetId: videoChipset.get(data['Chipset'])!,
      pcieGenerationId: pcieGeneration.get('PCIe 5.0')!, // don't have the data
      slotSize: Number.parseInt(data['Interface'].replace('PCIe x', ''), 10),
      image: '', // TODO
      image: data['image'],
    }))
  );

@@ -175,7 +175,7 @@ const seedComponents = async (tx: Prisma.TransactionClient) => {
      formFactorId: formFactor.get(data['Form Factor'])!,
      socketId: socket.get(data['Socket / CPU'])!,
      memorySlotCount: Number.parseInt(data['Memory Slots'], 10),
      image: '', // TODO
      image: data['image'],
      pcieSlots: {
        create: [
          {