Skip to content

Commit

Permalink
Playing defense when retrieving AORs
Browse files Browse the repository at this point in the history
  • Loading branch information
bogue committed Nov 7, 2023
1 parent 843de0f commit 8b64df5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/amid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default ((client: ApiRequester, baseUrl: string): AmiD => ({
getAors: async (endpoint: string) => {
const rawEvents = await client.post(`${baseUrl}/action/PJSIPShowEndpoint`, {
Endpoint: endpoint,
});
}) || [];
return rawEvents.filter((event: Record<string, any>) => event.Event === 'ContactStatusDetail');
},
}));

0 comments on commit 8b64df5

Please sign in to comment.