Skip to content

Commit

Permalink
Update index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroAntunesCosta committed Jun 18, 2024
1 parent af0b9ee commit 9334542
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { ClientsConfig, ServiceContext, RecorderState } from '@vtex/api'
import { LRUCache, method, Service } from '@vtex/api'

import { Clients } from './clients'
import { processMessage } from './middlewares/processMessage'
import { processTicket } from './middlewares/processTicket'
import { verifyZendeskSignature } from './middlewares/verifyZendeskSignature'

const TIMEOUT_MS = 800

Expand Down Expand Up @@ -49,11 +49,8 @@ export default new Service({
clients,
routes: {
// `status` is the route ID from service.json. It maps to an array of middlewares (or a single handler).
messages: method({
POST: [processMessage],
}),
tickets: method({
POST: [processTicket],
POST: [verifyZendeskSignature, processTicket],
}),
},
})

0 comments on commit 9334542

Please sign in to comment.