@studiocms/s3-storage 0.3.0 → 0.3.1

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.
@@ -93,7 +93,7 @@ class S3ApiService {
93
93
  "test",
94
94
  "list"
95
95
  ];
96
- if (authRequiredActions.includes(jsonBody.action) && !isAuthorized(type)) {
96
+ if (authRequiredActions.includes(jsonBody.action) && !await isAuthorized(type)) {
97
97
  return { data: { error: "Unauthorized" }, status: 401 };
98
98
  }
99
99
  switch (jsonBody.action) {
@@ -231,7 +231,7 @@ class S3ApiService {
231
231
  }
232
232
  getPUT(type) {
233
233
  return this.driver.handleEndpoint(async ({ getArrayBuffer, getHeader, isAuthorized }) => {
234
- if (!isAuthorized(type)) {
234
+ if (!await isAuthorized(type)) {
235
235
  return { data: { error: "Unauthorized" }, status: 401 };
236
236
  }
237
237
  const s3Interface = await getS3Client();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studiocms/s3-storage",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Add S3 Storage Support into your StudioCMS project.",
5
5
  "author": {
6
6
  "name": "withstudiocms",
@@ -54,7 +54,7 @@
54
54
  "@types/node": "^22.0.0",
55
55
  "astro": "^5.12.9",
56
56
  "vite": "^6.3.4",
57
- "studiocms": "^0.4.0"
57
+ "studiocms": "^0.4.3"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "effect": "^3.19.19"