Merge pull request #8 from saleor/add-types-to-event-validation
Add types for event validation middleware
This commit is contained in:
commit
626ee4e43b
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ export const withSaleorDomainPresent: Middleware =
|
|||
};
|
||||
|
||||
export const withSaleorEventMatch =
|
||||
(expectedEvent: string): Middleware =>
|
||||
<E extends string>(expectedEvent: `${Lowercase<E>}`): Middleware =>
|
||||
(handler) =>
|
||||
async (request) => {
|
||||
const receivedEvent = request.headers[SALEOR_EVENT_HEADER];
|
||||
|
|
Loading…
Reference in a new issue