squarecommonblhelper 5.2.0 → 5.2.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.
package/README.md CHANGED
@@ -15,6 +15,11 @@ helper for common bl for my projects.
15
15
 
16
16
  ## changelog
17
17
 
18
+ ### v5.2.1
19
+
20
+ - AuthenticationCommonBL:
21
+ - fix url in updateUserProfilePhotoV0.
22
+
18
23
  ### v5.2.0
19
24
 
20
25
  - AuthenticationCommonBL:
@@ -155,13 +155,13 @@ class AuthenticationCommonBL {
155
155
  async updateUserProfilePhotoV0(accessToken, profilePhoto) {
156
156
  try {
157
157
  const MAX_SIZE = 5 * 1024 * 1024; // 5 MiB
158
- const ALLOWED_TYPES = ['image/png', 'image/jpeg'];
158
+ const ALLOWED_TYPES = ["image/png", "image/jpeg"];
159
159
  if (profilePhoto) {
160
160
  if (!ALLOWED_TYPES.includes(profilePhoto.type)) {
161
- throw new Error('invalid file type: only png or jpeg allowed');
161
+ throw new Error("invalid file type: only png or jpeg allowed");
162
162
  }
163
163
  if (profilePhoto.size > MAX_SIZE) {
164
- throw new Error('file too large: must be under 5 MiB');
164
+ throw new Error("file too large: must be under 5 MiB");
165
165
  }
166
166
  }
167
167
  const formData = new FormData();
@@ -172,7 +172,7 @@ class AuthenticationCommonBL {
172
172
  // base url
173
173
  this.commonBLBaseURL,
174
174
  // endpoint
175
- "update_user_profile_photo/v0",
175
+ "update_profile_photo/v0",
176
176
  // method
177
177
  "PATCH",
178
178
  // headers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarecommonblhelper",
3
- "version": "5.2.0",
3
+ "version": "5.2.1",
4
4
  "description": "helper for common bl for my projects.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",