fix: 🐛 address pr feedback
This commit is contained in:
parent
d63e88bdb6
commit
1c04327bd6
3 changed files with 1 additions and 16 deletions
|
@ -13,6 +13,7 @@ const formatCalculatedAmount = (amount: number) => {
|
|||
return Number(amount.toFixed(2));
|
||||
};
|
||||
|
||||
// * This type is related to `TaxLineItem` from TaxJar. It should be unified.
|
||||
type FetchTaxesLinePayload = {
|
||||
id: string;
|
||||
quantity: number;
|
||||
|
|
|
@ -27,14 +27,6 @@ export default checkoutCalculateTaxesSyncWebhook.createHandler(async (req, res,
|
|||
const { authData, payload } = ctx;
|
||||
logger.info({ payload }, "Handler called with payload");
|
||||
|
||||
if (!authData) {
|
||||
logger.error("Auth data not found");
|
||||
logger.info("Returning no data");
|
||||
return res.send({});
|
||||
}
|
||||
|
||||
logger.info("Parsing payload...");
|
||||
|
||||
const validation = calculateTaxesPayloadSchema.safeParse(payload);
|
||||
|
||||
if (!validation.success) {
|
||||
|
|
|
@ -27,14 +27,6 @@ export default orderCalculateTaxesSyncWebhook.createHandler(async (req, res, ctx
|
|||
const { authData, payload } = ctx;
|
||||
logger.info({ payload }, "Handler called with payload");
|
||||
|
||||
if (!authData) {
|
||||
logger.error("Auth data not found");
|
||||
logger.info("Returning no data");
|
||||
return res.status(200).json({});
|
||||
}
|
||||
|
||||
logger.info("Parsing payload...");
|
||||
|
||||
const validation = calculateTaxesPayloadSchema.safeParse(payload);
|
||||
|
||||
if (!validation.success) {
|
||||
|
|
Loading…
Reference in a new issue