From aafa0eee6dc25d7c98aa8e1b21f2f811d8580dc6 Mon Sep 17 00:00:00 2001 From: Mohannad Otaibi Date: Sat, 27 May 2023 18:58:43 +0300 Subject: [PATCH] . --- CHANGELOG.md | 6 ++++++ package.json | 2 +- readme.md | 7 +++++++ src/index.ts | 5 +++-- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27410e9..c7f4a45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # swarmapp-api +## 2.7.7 + +### Patch Changes + +- Fixing prefix of error logging + ## 2.7.6 ### Patch Changes diff --git a/package.json b/package.json index 67197ab..817c8c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swarmapp-api", - "version": "2.7.6", + "version": "2.7.7", "description": "A javascript wrapper for swarmapp (foursquare) API", "main": "dist/index.js", "module": "dist/index.mjs", diff --git a/readme.md b/readme.md index ff58dd4..45657e8 100644 --- a/readme.md +++ b/readme.md @@ -67,6 +67,13 @@ Let's say you want to retrieve the list of check-ins for a particular user on Sw I will be glad ♥ (for the time-being) to add the feature you are missing, just open an issue. +## Updates + +- `pnpm changeset` +- `pnpm changeset version` +- commit +- push + ## Contributing We welcome contributions from the community! To contribute to the SwarmApp API, follow these steps: diff --git a/src/index.ts b/src/index.ts index 4342dbe..b5b81e3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -439,7 +439,7 @@ class SwarmappApi { const recent = await this.getRecent(limit); for(const checkin of recent){ - // this.log(`Checkin ${checkin.id} liked before = ${checkin.like}`); + if(checkin.like == false) { const liked_result = await this.likeCheckin(checkin.id); this.log(`liked ${checkin.id}`); @@ -477,8 +477,9 @@ class SwarmappApi { error(error: any){ let _prefix = `${new Date().toLocaleString()} - `; - _prefix += typeof this?.user?.firstName != 'undefined' ? this?.user?.firstName : this?.user?.id + _prefix += typeof this?.user?.firstName != 'undefined' ? this?.user?.firstName : this.config.oauth_token _prefix += ' - Error: ' + switch (error?.meta?.code) { case 401: throw new Error(`${_prefix} [${error.meta.errorType}] ${error.meta.errorDetail}`)