Skip to content

Commit

Permalink
camelCase support in events-relay
Browse files Browse the repository at this point in the history
  • Loading branch information
normanrz committed Feb 7, 2024
1 parent ca15677 commit ebf43ef
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions events-relay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,16 @@ app.get("/health", (req, res) => {
app.post("/events", async (req, res) => {
try {
const reqPayload = req.body;
const webknossosUri = reqPayload.events[0].user_properties.webknossos_uri;
const webknossosUri =
reqPayload.events[0].user_properties != null
? reqPayload.events[0].user_properties.webknossos_uri
: reqPayload.events[0].userProperties.webknossosUri;
if (
reqPayload.events.some(
(ev) => ev.user_properties.webknossos_uri !== webknossosUri
(ev) =>
(ev.user_properties != null
? ev.user_properties.webknossos_uri
: ev.userProperties.webknossosUri) !== webknossosUri
)
) {
res
Expand Down

0 comments on commit ebf43ef

Please sign in to comment.