Skip to content

Commit b6d5d07

Browse files
committed
fix(paghiper): Minor fix preventing duplicated response call on webhook (on sucess)
1 parent c7d6339 commit b6d5d07

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/apps/paghiper/src/functions-lib/handle-webhook.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ import type { Orders } from '@cloudcommerce/types';
22
import type { Request, Response } from 'firebase-functions/v1';
33
import api from '@cloudcommerce/api';
44
import { Endpoint } from '@cloudcommerce/api/types';
5-
import config, { logger } from '@cloudcommerce/firebase/lib/config';
5+
import { logger } from '@cloudcommerce/firebase/lib/config';
66
import getAppData from '@cloudcommerce/firebase/lib/helpers/get-app-data';
77
import createAxios from './create-axios';
88

9-
const { apps } = config.get();
10-
119
const CLIENT_ERR = 'invalidClient';
1210

1311
const listOrdersByTransaction = async (transactionCode: string) => {
@@ -172,7 +170,7 @@ export default async (req: Request, res: Response) => {
172170
});
173171
}
174172
};
175-
await handleNotification();
173+
return await handleNotification();
176174
}
177175

178176
return res.status(400).send('API key does not match');

0 commit comments

Comments
 (0)