@beastmode-develeap/beastmode 0.1.284 → 0.1.286

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/dist/index.js CHANGED
@@ -5839,6 +5839,9 @@ function getBoardRoutes(factoryDir) {
5839
5839
  method: "POST",
5840
5840
  pattern: "/api/board/items",
5841
5841
  handler: async (body, _params, query) => {
5842
+ if (!query?.board) {
5843
+ throw new HttpError(400, { error: "board query parameter is required for write operations" });
5844
+ }
5842
5845
  const boardUrl = getBoardUrl2(factoryDir);
5843
5846
  return proxyToBoard(boardUrl, "POST", "/api/items", body, scopedQuery(query));
5844
5847
  }
@@ -5847,6 +5850,9 @@ function getBoardRoutes(factoryDir) {
5847
5850
  method: "PATCH",
5848
5851
  pattern: "/api/board/items/:id",
5849
5852
  handler: async (body, params, query) => {
5853
+ if (!query?.board) {
5854
+ throw new HttpError(400, { error: "board query parameter is required for write operations" });
5855
+ }
5850
5856
  const boardUrl = getBoardUrl2(factoryDir);
5851
5857
  return proxyToBoard(boardUrl, "PATCH", `/api/items/${params.id}`, body, scopedQuery(query));
5852
5858
  }
@@ -5855,6 +5861,9 @@ function getBoardRoutes(factoryDir) {
5855
5861
  method: "DELETE",
5856
5862
  pattern: "/api/board/items/:id",
5857
5863
  handler: async (_body, params, query) => {
5864
+ if (!query?.board) {
5865
+ throw new HttpError(400, { error: "board query parameter is required for write operations" });
5866
+ }
5858
5867
  const boardUrl = getBoardUrl2(factoryDir);
5859
5868
  return proxyToBoard(boardUrl, "DELETE", `/api/items/${params.id}`, void 0, scopedQuery(query));
5860
5869
  }
@@ -5871,6 +5880,9 @@ function getBoardRoutes(factoryDir) {
5871
5880
  method: "POST",
5872
5881
  pattern: "/api/board/items/:id/updates",
5873
5882
  handler: async (body, params, query) => {
5883
+ if (!query?.board) {
5884
+ throw new HttpError(400, { error: "board query parameter is required for write operations" });
5885
+ }
5874
5886
  const boardUrl = getBoardUrl2(factoryDir);
5875
5887
  return proxyToBoard(boardUrl, "POST", `/api/items/${params.id}/updates`, body, scopedQuery(query));
5876
5888
  }