Skip to content

Commit

Permalink
Don't await, doesn't seem necessary on Vercel (events are ingested co…
Browse files Browse the repository at this point in the history
…rrectly as expected)
  • Loading branch information
Vadorequest committed Jun 23, 2021
1 parent d36c7e4 commit 5c7f1f3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/pages/api/autoRedirectToLocalisedPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
* @method GET
*/
const autoRedirectToLocalisedPage = async (req: NextApiRequest, res: NextApiResponse): Promise<void> => {
await logEvent(AMPLITUDE_EVENTS.API_INVOKED, null, {
logEvent(AMPLITUDE_EVENTS.API_INVOKED, null, {
apiEndpoint: AMPLITUDE_API_ENDPOINTS.AUTO_REDIRECT_TO_LOCALISED_PAGE,
});

Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const error = async (req: NextApiRequest, res: NextApiResponse): Promise<
try {
configureReq(req, { fileLabel });

await logEvent(AMPLITUDE_EVENTS.API_INVOKED, null, {
logEvent(AMPLITUDE_EVENTS.API_INVOKED, null, {
apiEndpoint: AMPLITUDE_API_ENDPOINTS.ERROR,
});

Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const preview = async (req: EndpointRequest, res: NextApiResponse): Promi
try {
configureReq(req, { fileLabel });

await logEvent(AMPLITUDE_EVENTS.API_INVOKED, null, {
logEvent(AMPLITUDE_EVENTS.API_INVOKED, null, {
apiEndpoint: AMPLITUDE_API_ENDPOINTS.PREVIEW,
});

Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/startVercelDeployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const startVercelDeployment = async (req: EndpointRequest, res: NextApiResponse)
try {
configureReq(req, { fileLabel });

await logEvent(AMPLITUDE_EVENTS.API_INVOKED, null, {
logEvent(AMPLITUDE_EVENTS.API_INVOKED, null, {
apiEndpoint: AMPLITUDE_API_ENDPOINTS.START_VERCEL_DEPLOYMENT,
});

Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const status = async (req: NextApiRequest, res: NextApiResponse): Promise
try {
configureReq(req, { fileLabel });

await logEvent(AMPLITUDE_EVENTS.API_INVOKED, null, {
logEvent(AMPLITUDE_EVENTS.API_INVOKED, null, {
apiEndpoint: AMPLITUDE_API_ENDPOINTS.STATUS,
});

Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/webhooks/deploymentCompleted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const deploymentCompleted = async (req: EndpointRequest, res: NextApiResp
try {
configureReq(req, { fileLabel });

await logEvent(AMPLITUDE_EVENTS.API_INVOKED, null, {
logEvent(AMPLITUDE_EVENTS.API_INVOKED, null, {
apiEndpoint: AMPLITUDE_API_ENDPOINTS.WEBHOOK_DEPLOYMENT_COMPLETED,
});

Expand Down

0 comments on commit 5c7f1f3

Please sign in to comment.