Skip to content

feat: add medialog endpoint to helix6#205

Merged
amol-anand merged 4 commits intomainfrom
medialog
Apr 23, 2026
Merged

feat: add medialog endpoint to helix6#205
amol-anand merged 4 commits intomainfrom
medialog

Conversation

@amol-anand
Copy link
Copy Markdown
Contributor

Related Issues

#177

@github-actions
Copy link
Copy Markdown

This PR will trigger a minor release when merged.

Comment thread src/medialog/add.js Outdated
Comment on lines +34 to +36
if (!contentBusId) {
return errorResponse(log, 400, 'Unable to resolve contentBusId for this site');
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not necessary: org and site will have been resolved upon calling this handler, so there is a content bus id

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — removed in 7a7e879. You're right, the middleware guarantees contentBusId is resolved by the time we reach the handler.

Comment thread src/support/medialog.js Outdated
Comment on lines +26 to +29
if (!contentBusId) {
log.warn('Unable to send media log entry: contentBusId is empty');
return;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again: not possible AFAIU

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed as well in 7a7e879. Thanks!

@dominique-pfister
Copy link
Copy Markdown
Contributor

Tests are very nicely structured and easily understandable 🥇
I just think that the guard for a missing contentBusId is superfluous, but happy to be proven wrong!

amol-anand added a commit that referenced this pull request Apr 18, 2026
Addresses review feedback on PR #205: org/site are resolved by
middleware before the handler runs, so contentBusId is guaranteed
to be present. The guards were dead code.

Made-with: Cursor
Addresses review feedback on PR #205: org/site are resolved by
middleware before the handler runs, so contentBusId is guaranteed
to be present. The guards were dead code.

Made-with: Cursor
- Drop unreachable `!contentBusId` guard in query.js (same reason as
  the add.js/support cleanup in 021b584: org/site are resolved by
  middleware before the handler runs).
- Remove the unused standalone `mediaLog` helper from support/medialog.js;
  only `MediaLogBatch` is consumed (by add.js).

Made-with: Cursor
@amol-anand amol-anand merged commit 41e2eea into main Apr 23, 2026
6 checks passed
@amol-anand amol-anand deleted the medialog branch April 23, 2026 22:26
github-actions Bot pushed a commit that referenced this pull request Apr 23, 2026
# [1.51.0](v1.50.0...v1.51.0) (2026-04-23)

### Features

* add medialog endpoint to helix6 ([#205](#205)) ([41e2eea](41e2eea))
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.51.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants