feat: Create cart with line items (#6449)
**What** - Add support for creating a cart with items - Add endpoint `POST /store/carts/:id/line-items` - Add `CreateCartWorkflow` - Add `AddToCartWorkflow` - Add steps for both workflows **Testing** - Endpoints - Workflows I would still call this a first iteration, as we are missing a few pieces of the full flow, such as payment sessions, discounts, and taxes. Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
This commit is contained in:
@@ -55,7 +55,7 @@ export class InMemoryDistributedTransactionStorage extends DistributedTransactio
|
||||
])
|
||||
}
|
||||
|
||||
private stringifyWithSymbol(key, value) {
|
||||
/*private stringifyWithSymbol(key, value) {
|
||||
if (key === "__type" && typeof value === "symbol") {
|
||||
return Symbol.keyFor(value)
|
||||
}
|
||||
@@ -69,7 +69,7 @@ export class InMemoryDistributedTransactionStorage extends DistributedTransactio
|
||||
}
|
||||
|
||||
return value
|
||||
}
|
||||
}*/
|
||||
|
||||
async get(key: string): Promise<TransactionCheckpoint | undefined> {
|
||||
return this.storage.get(key)
|
||||
@@ -105,7 +105,7 @@ export class InMemoryDistributedTransactionStorage extends DistributedTransactio
|
||||
})
|
||||
}
|
||||
|
||||
const stringifiedData = JSON.stringify(data, this.stringifyWithSymbol)
|
||||
const stringifiedData = JSON.stringify(data)
|
||||
const parsedData = JSON.parse(stringifiedData)
|
||||
|
||||
if (hasFinished && !retentionTime) {
|
||||
|
||||
Reference in New Issue
Block a user