From cfa25fc0e09ab88e2a879181cb50efc88983aebf Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Wed, 4 Jun 2025 09:14:57 +0200 Subject: [PATCH 1/4] docs: fix adapter sentence (#131) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 42263f4..4c6920f 100755 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ A provider contains the URL that points to the search results for the respective **It is important that you order the search results by date, so that _Fredy_ always picks the latest results first!** #### Adapter -_Fredy_ supports multiple adapters, such as Slack, SendGrid, Telegram etc. A search job can have as many adapters as supported by _Fredy_. Each adapter needs different configuration values, which you have to provide when using them. A adapter dictactes how the frontend renders by telling the frontend what information it needs in order to send listings to the user. +_Fredy_ supports multiple adapters, such as Slack, SendGrid, Telegram etc. A search job can have as many adapters as supported by _Fredy_. Each adapter needs different configuration values, which you have to provide when using them. An adapter dictates how the frontend renders by telling the frontend what information it needs in order to send listings to the user. #### Jobs A Job wraps adapters and providers. _Fredy_ runs the configured jobs in a specific interval (can be configured in `/conf/config.json`). From 2194ffe0f4c032265009ab8dce852b0ab8fbc4f3 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Wed, 4 Jun 2025 09:15:15 +0200 Subject: [PATCH 2/4] Fix typo in README (#133) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c6920f..745b704 100755 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ yarn run test ![Architecture](/doc/architecture.jpg "Architecture") ### Immoscout -Immoscout has implemented advanced bot detection. In order to work around this, we are using a reversed engineered version of their mobile api. See See [Immoscout Reverse Engineering Documentation](https://github.com/orangecoding/fredy/blob/master/reverse-engineered-immoscout.md) +Immoscout has implemented advanced bot detection. In order to work around this, we are using a reversed engineered version of their mobile api. See [Immoscout Reverse Engineering Documentation](https://github.com/orangecoding/fredy/blob/master/reverse-engineered-immoscout.md) # Analytics Fredy is completely free (and will always remain free). However, it would be a huge help if you’d allow me to collect some analytical data. From 111c154ae39abc79f264629310c6e058941b493f Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Wed, 4 Jun 2025 09:15:36 +0200 Subject: [PATCH 3/4] Fix job ownership verification (#132) --- lib/api/routes/jobRouter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api/routes/jobRouter.js b/lib/api/routes/jobRouter.js index 6b6f6a6..077aa48 100644 --- a/lib/api/routes/jobRouter.js +++ b/lib/api/routes/jobRouter.js @@ -15,7 +15,7 @@ function doesJobBelongsToUser(job, req) { if (user == null) { return false; } - return user.isAdmin || job.userId === job.userId; + return user.isAdmin || job.userId === user.id; } jobRouter.get('/', async (req, res) => { const isUserAdmin = isAdmin(req); From f032e6a724e8dc73b270bcb3d97b1dfcb38c1ba8 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Wed, 4 Jun 2025 09:15:53 +0200 Subject: [PATCH 4/4] test: verify unrelated text yields no similarity (#130) --- test/similarity/similarity.test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/similarity/similarity.test.js b/test/similarity/similarity.test.js index 84e103f..a345a60 100644 --- a/test/similarity/similarity.test.js +++ b/test/similarity/similarity.test.js @@ -34,6 +34,7 @@ describe('similarityCheck', () => { check.setCacheEntry( 'where |X| and |Y| are the cardinalities of the two sets (i.e. the number of elements in each set). The Sørensen index equals twice the number of elements common to both sets divided by the sum of the number of elements in each set.', ); + expect(check.hasSimilarEntries('unrelated text')).to.be.false; }); }); });