Skip to content

Commit

Permalink
Remove deprecated fields
Browse files Browse the repository at this point in the history
  • Loading branch information
pozylon committed Nov 26, 2024
1 parent de46ac5 commit ff21b61
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 19 deletions.
3 changes: 0 additions & 3 deletions docs/docs/advanced/bulk-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ Options:

Set by Unchained:

- authorId,
- slug history
- \_id, created & updated if not provided

Expand Down Expand Up @@ -235,7 +234,6 @@ Status:

Set by Unchained:

- authorId,
- slug history
- \_id, created & updated if not provided

Expand Down Expand Up @@ -324,7 +322,6 @@ Set by Unchained:

Set by Unchained:

- authorId,
- \_id, created & updated if not provided

```json
Expand Down
1 change: 0 additions & 1 deletion docs/docs/advanced/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ const someResolver = async (root, params, context: AppContext) => {
...params,
},
},
userId
);
return true;
};
Expand Down
3 changes: 1 addition & 2 deletions docs/docs/advanced/write-plugins/delivery.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const ShopPickUp: IDeliveryAdapter = {
];
},
send: async (): Promise<boolean | Work> => {
const { modules, order, userId } = context as typeof context;
const { modules, order } = context as typeof context;
await modules.worker.addWork(
{
type: 'MARK_ORDER_DELIVERED',
Expand All @@ -86,7 +86,6 @@ const ShopPickUp: IDeliveryAdapter = {
orderDeliveryId: order.deliveryId,
},
},
userId,
);

return false;
Expand Down
1 change: 0 additions & 1 deletion docs/docs/advanced/write-plugins/worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ unchainedAPI.modules.worker.addWork(
wait: 1000,
},
},
userId: '1234567',
);
}

Expand Down
1 change: 0 additions & 1 deletion packages/core-products/src/mock/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export default {
type: 'SIMPLE_PRODUCT',
status: 'ACTIVE',
sequence: 10,
authorId: 'PKve0k9fLCUzn2EUi',
tags: [],
created: new Date('2022-10-28T10:41:13.346Z'),
createdBy: 'PKve0k9fLCUzn2EUi',
Expand Down
14 changes: 5 additions & 9 deletions packages/plugins/src/payment/apple-iap/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,11 @@ const AppleIAP: IPaymentAdapter = {
throw new Error('Apple IAP Plugin: Transaction already processed');

// All good
const userId = order?.userId || params.paymentContext?.userId;
await appleTransactions.createTransaction(
{
_id: transactionIdentifier,
matchedTransaction,
orderId: order._id,
},
userId,
);
await appleTransactions.createTransaction({
_id: transactionIdentifier,
matchedTransaction,
orderId: order._id,
});

return {
transactionIdentifier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AppleTransaction, AppleTransactionsCollection } from '../db/AppleTransa
export interface AppleTransactionsModule {
findTransactionById: (transactionIdentifier: string) => Promise<AppleTransaction>;

createTransaction: (doc: AppleTransaction, userId: string) => Promise<string | null>;
createTransaction: (doc: AppleTransaction) => Promise<string | null>;
}

export const configureAppleTransactionsModule = async ({ db }): Promise<AppleTransactionsModule> => {
Expand Down
1 change: 0 additions & 1 deletion tests/seeds/products.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ export const JpegMedia = {
name: 'Screenshot from 2021-09-07 21-20-22.png',
meta: {
mediaId: '4CZA6tzAuKuJx5WQc',
authorId: 'FhMH2xKuTGW20uO8k',
},
size: '779663',
type: 'image/jpeg',
Expand Down

0 comments on commit ff21b61

Please sign in to comment.