product-review/app/routes/webhooks.app.scopes_update.jsx

15 lines
399 B
JavaScript

import { authenticate } from "../shopify.server";
export const action = async ({ request }) => {
const { payload, session, topic, shop } = await authenticate.webhook(request);
console.log(`Received ${topic} webhook for ${shop}`);
const current = payload.current;
if (session) {
// In memory storage, we don't need to manually update the scope in a DB
}
return new Response();
};