From 555be11290540ac4ce515926fb74e4b3cc24dd8c Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Wed, 16 Jun 2021 21:19:12 -0400 Subject: [PATCH] Fix --- commands/search/recipe.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/commands/search/recipe.js b/commands/search/recipe.js index 7f9d23ac..21f4cfd3 100644 --- a/commands/search/recipe.js +++ b/commands/search/recipe.js @@ -48,15 +48,13 @@ module.exports = class RecipeCommand extends Command { } async fetchRecipe(query) { - let result; try { const { text } = await request .get('http://www.recipepuppy.com/api/') .query({ q: query }); - result = text; - return JSON.parse(result); - } catch { - return JSON.parse(result.split('