From 3fd74b7012aaf35bb93fa515b3db14f402c0f2e1 Mon Sep 17 00:00:00 2001 From: Wade Wegner Date: Thu, 8 Mar 2018 06:23:11 -0800 Subject: [PATCH] Removed unneeded debug statements --- .../aura/SearchGIPHY/SearchGIPHYController.js | 31 +------------------ .../aura/SearchGIPHY/SearchGIPHYHelper.js | 8 ----- .../main/default/classes/ChatterHelper.cls | 5 +-- 3 files changed, 2 insertions(+), 42 deletions(-) diff --git a/force-app/main/default/aura/SearchGIPHY/SearchGIPHYController.js b/force-app/main/default/aura/SearchGIPHY/SearchGIPHYController.js index 16e2bae..46d21bf 100644 --- a/force-app/main/default/aura/SearchGIPHY/SearchGIPHYController.js +++ b/force-app/main/default/aura/SearchGIPHY/SearchGIPHYController.js @@ -6,17 +6,14 @@ doInit: function (component, event, helper) { console.log('doInit called successfully'); - - }, keyCheck: function (component, event, helper) { + if (event.which == 13) { - console.log('keyCheck detected enter') var searchTerms = component.get("v.searchTerms"); helper.search(searchTerms, function (results) { - console.log('keyCheck enter returned from helper') _GIPHY.setResults(results); component.set("v.results", results.data); }); @@ -26,11 +23,8 @@ search: function (component, event, helper) { - console.log('search called successfully'); - var searchTerms = component.get("v.searchTerms"); helper.search(searchTerms, function (results) { - console.log('search returned from helper') _GIPHY.setResults(results); component.set("v.results", results.data); }); @@ -43,27 +37,12 @@ component.set("v.showModal", true); - - console.log('gifSelected called successfully'); - var id = event.target.dataset.index; - console.log(id); - var results = _GIPHY.getResults(); - - console.log("results"); - console.log(results); - - var selectedGif = results.data.find(item => item.id === id) - console.log(selectedGif); - var width = selectedGif.images.original.width; var height = selectedGif.images.original.height; - console.log("width: " + width); - console.log("height: " + height); - component.set("v.selectedGifWidth", width); component.set("v.selectedGifHeight", height); component.set("v.selectedGif", "https://media0.giphy.com/media/" + id + "/giphy.gif"); @@ -78,9 +57,6 @@ var chatterText = component.get("v.chatterText"); var imageUrl = component.get("v.selectedGif"); - - console.log('chatterText: ' + chatterText); - var action = component.get("c.getChatterGroups"); action.setParams({ @@ -90,14 +66,9 @@ $A.enqueueAction(action); - console.log('about to set callback'); - action.setCallback(this, function (response) { - console.log('i am back'); var feedItemId = response.getReturnValue(); - console.log('feedItemId'); - console.log(feedItemId); var urlEvent = $A.get("e.force:navigateToURL"); urlEvent.setParams({ diff --git a/force-app/main/default/aura/SearchGIPHY/SearchGIPHYHelper.js b/force-app/main/default/aura/SearchGIPHY/SearchGIPHYHelper.js index 6599c87..f52223e 100644 --- a/force-app/main/default/aura/SearchGIPHY/SearchGIPHYHelper.js +++ b/force-app/main/default/aura/SearchGIPHY/SearchGIPHYHelper.js @@ -1,18 +1,10 @@ ({ search: function (searchTerms, data) { - console.log('search called successfully'); - console.log(searchTerms); - var apiKey = _GIPHY.getApiKey(); - console.log(apiKey); $.getJSON("https://api.giphy.com/v1/gifs/search?api_key=" + apiKey + "&q=" + searchTerms + "&limit=8&offset=0&rating=G&lang=en", function (results) { - console.log('called api'); - console.log(results); - console.log(results.data.length); - data(results); }); diff --git a/force-app/main/default/classes/ChatterHelper.cls b/force-app/main/default/classes/ChatterHelper.cls index 34773c9..86fccc2 100644 --- a/force-app/main/default/classes/ChatterHelper.cls +++ b/force-app/main/default/classes/ChatterHelper.cls @@ -3,10 +3,7 @@ public with sharing class ChatterHelper { @AuraEnabled public static String getChatterGroups(String imageUrl, String chatterText) { - System.debug('getChatterGroups'); - - // String imageUrl = 'https://media0.giphy.com/media/xTiTncVep2khPGhK1i/giphy.gif'; - String fileName = 'me.gif'; + String fileName = 'giphy.gif'; String body = chatterText; Blob imageData = getImageData(imageUrl);