aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/server
diff options
context:
space:
mode:
authorLibravatar kytwb <kytwb@pm.me>2022-01-02 00:40:42 +0100
committerLibravatar kytwb <kytwb@pm.me>2022-01-02 00:40:42 +0100
commit55dd67d28e691338b4ecbe928436c4f2a41ad5cb (patch)
treeb73fa0fb7398673c936888f72c8027456bfb463f /src/api/server
parentRevert "Removed 'Most Popular' services since it alludes to user-tracking (#1... (diff)
downloadferdium-app-55dd67d28e691338b4ecbe928436c4f2a41ad5cb.tar.gz
ferdium-app-55dd67d28e691338b4ecbe928436c4f2a41ad5cb.tar.zst
ferdium-app-55dd67d28e691338b4ecbe928436c4f2a41ad5cb.zip
Revert "Removed straggling code related to popular services."
Diffstat (limited to 'src/api/server')
-rw-r--r--src/api/server/ServerApi.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/server/ServerApi.ts b/src/api/server/ServerApi.ts
index 2fd1a8d0d..0144a1069 100644
--- a/src/api/server/ServerApi.ts
+++ b/src/api/server/ServerApi.ts
@@ -368,11 +368,12 @@ export default class ServerApi {
368 } 368 }
369 369
370 async getFeaturedRecipePreviews() { 370 async getFeaturedRecipePreviews() {
371 // TODO: If we are hitting the internal-server, we need to return an empty list, else we can hit the remote server and get the data
372 const request = await sendAuthRequest(`${apiBase()}/recipes/popular`); 371 const request = await sendAuthRequest(`${apiBase()}/recipes/popular`);
373 if (!request.ok) throw new Error(request.statusText); 372 if (!request.ok) throw new Error(request.statusText);
374 373
375 const data = await request.json(); 374 const data = await request.json();
375 // data = this._addLocalRecipesToPreviews(data);
376
376 const recipePreviews = this._mapRecipePreviewModel(data); 377 const recipePreviews = this._mapRecipePreviewModel(data);
377 debug('ServerApi::getFeaturedRecipes resolves', recipePreviews); 378 debug('ServerApi::getFeaturedRecipes resolves', recipePreviews);
378 return recipePreviews; 379 return recipePreviews;