payload-plugin-newsletter 0.17.2 → 0.17.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ## [0.17.4] - 2025-07-30
2
+
3
+ ### Fixed
4
+ - **Resolved Lint Errors** - Fixed CI/CD build failures caused by lint errors
5
+ - Removed unused imports from `endpoints/broadcasts/index.ts`
6
+ - Prefixed unused `collectionSlug` parameter with underscore in `preview.ts`
7
+ - Ensures clean build and successful npm publish
8
+
9
+ ## [0.17.3] - 2025-07-30
10
+
11
+ ### Fixed
12
+ - **Duplicate Collection Slug in Endpoint Paths** - Fixed broadcast endpoints having duplicate collection slugs
13
+ - Removed collection slug from endpoint paths as Payload automatically prepends it
14
+ - Changed `/${collectionSlug}/preview` to `/preview`
15
+ - Changed `/${collectionSlug}/:id/send` to `/:id/send`
16
+ - Changed `/${collectionSlug}/:id/schedule` to `/:id/schedule`
17
+ - Changed `/${collectionSlug}/:id/test` to `/:id/test`
18
+ - Fixes 404 errors when accessing endpoints from `/api/broadcasts/preview` instead of `/api/broadcasts/broadcasts/preview`
19
+ - Client code can now properly access endpoints at their expected paths
20
+
1
21
  ## [0.17.2] - 2025-07-29
2
22
 
3
23
  ### Fixed
@@ -1357,7 +1357,7 @@ async function requireAdmin(req, config) {
1357
1357
  // src/endpoints/broadcasts/send.ts
1358
1358
  var createSendBroadcastEndpoint = (config, collectionSlug) => {
1359
1359
  return {
1360
- path: `/${collectionSlug}/:id/send`,
1360
+ path: "/:id/send",
1361
1361
  method: "post",
1362
1362
  handler: async (req) => {
1363
1363
  try {
@@ -1441,7 +1441,7 @@ var createSendBroadcastEndpoint = (config, collectionSlug) => {
1441
1441
  init_types();
1442
1442
  var createScheduleBroadcastEndpoint = (config, collectionSlug) => {
1443
1443
  return {
1444
- path: `/${collectionSlug}/:id/schedule`,
1444
+ path: "/:id/schedule",
1445
1445
  method: "post",
1446
1446
  handler: async (req) => {
1447
1447
  try {
@@ -1544,7 +1544,7 @@ var createScheduleBroadcastEndpoint = (config, collectionSlug) => {
1544
1544
  // src/endpoints/broadcasts/test.ts
1545
1545
  var createTestBroadcastEndpoint = (config, collectionSlug) => {
1546
1546
  return {
1547
- path: `/${collectionSlug}/:id/test`,
1547
+ path: "/:id/test",
1548
1548
  method: "post",
1549
1549
  handler: async (req) => {
1550
1550
  try {
@@ -1625,9 +1625,9 @@ var createTestBroadcastEndpoint = (config, collectionSlug) => {
1625
1625
  };
1626
1626
 
1627
1627
  // src/endpoints/broadcasts/preview.ts
1628
- var createBroadcastPreviewEndpoint = (config, collectionSlug) => {
1628
+ var createBroadcastPreviewEndpoint = (config, _collectionSlug) => {
1629
1629
  return {
1630
- path: `/${collectionSlug}/preview`,
1630
+ path: "/preview",
1631
1631
  method: "post",
1632
1632
  handler: async (req) => {
1633
1633
  try {