beckn / strapi-plugins

0 stars 1 forks source link

Create an event listener to listen for events emitted by the emitter. #9

Closed em-abee closed 8 months ago

em-abee commented 8 months ago

Description

Create an event listener that listens for the event named webhook.request. This event is emitted when the Protocol Server calls the Strapi webhook. Subscribe to this event and call the handler. The handler should include logic to invoke the service based on the provided action.

Goals

Expected Outcome

The event subscriber should call service function of the action.

Acceptance Criteria

Implementation Details

In bootstrap.ts, subscribe to the webhook.request event. In the handler function, check the action received in the payload. Call the service function corresponding to the received action.

Product Name

Beckn

Project Name

Strapi BPP

Organization Name:

EM

Tech Skills Needed:

Strapi and Typescript

Complexity

Medium

Category

Feature

Sub Category

API, Backend

em-abee commented 8 months ago

Changes merged, closing the ticket.

em-abee commented 7 months ago

PR - https://github.com/beckn/strapi-plugins/pull/16