@amohamud23/notihub 1.1.21 → 1.1.22

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.cjs CHANGED
@@ -268,10 +268,10 @@ var User = class _User {
268
268
  */
269
269
  static async updateUser(id, user) {
270
270
  const updateFields = Object.keys(user).filter(
271
- (key) => user[key] !== void 0
271
+ (key) => key !== "id" && user[key] !== void 0
272
272
  );
273
273
  if (updateFields.length === 0) {
274
- throw new Error("No fields provided to update.");
274
+ throw new Error("No valid fields provided to update.");
275
275
  }
276
276
  const UpdateExpression = `SET ${updateFields.map((field, idx) => `#field${idx} = :value${idx}`).join(", ")}`;
277
277
  const ExpressionAttributeNames = updateFields.reduce((acc, field, idx) => {
package/dist/index.js CHANGED
@@ -235,10 +235,10 @@ var User = class _User {
235
235
  */
236
236
  static async updateUser(id, user) {
237
237
  const updateFields = Object.keys(user).filter(
238
- (key) => user[key] !== void 0
238
+ (key) => key !== "id" && user[key] !== void 0
239
239
  );
240
240
  if (updateFields.length === 0) {
241
- throw new Error("No fields provided to update.");
241
+ throw new Error("No valid fields provided to update.");
242
242
  }
243
243
  const UpdateExpression = `SET ${updateFields.map((field, idx) => `#field${idx} = :value${idx}`).join(", ")}`;
244
244
  const ExpressionAttributeNames = updateFields.reduce((acc, field, idx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amohamud23/notihub",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "description": "Notihub Package",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.cts",