From 4b8ae0db0b9e3bb4fe5378c52118aab05fd5f1e3 Mon Sep 17 00:00:00 2001 From: Dwayne Harris Date: Thu, 5 Dec 2019 01:03:07 -0500 Subject: [PATCH] WIP --- src/apps/gif-app/composer/app.tsx | 2 +- src/server/{api/index.ts => api.ts} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/server/{api/index.ts => api.ts} (97%) diff --git a/src/apps/gif-app/composer/app.tsx b/src/apps/gif-app/composer/app.tsx index 79b8baa..495b123 100644 --- a/src/apps/gif-app/composer/app.tsx +++ b/src/apps/gif-app/composer/app.tsx @@ -60,7 +60,7 @@ const App: FC = ({ communicator }) => { if (content.settings) setSettings(content.settings) if (content.theme) setTheme(content.theme) - if (content.parent && content.parent.data && content.parent.data.search) { + if (content.parent?.data?.search) { setSearch(content.parent.data.search) } } diff --git a/src/server/api/index.ts b/src/server/api.ts similarity index 97% rename from src/server/api/index.ts rename to src/server/api.ts index c2f7a5a..822440b 100644 --- a/src/server/api/index.ts +++ b/src/server/api.ts @@ -10,7 +10,7 @@ import { } from 'fastify' import { Server, IncomingMessage, ServerResponse } from 'http' import request from 'request' -import { PluginOptions, GiphyResponse } from '../../types' +import { PluginOptions, GiphyResponse } from '../types' interface FetchOptions { url: string @@ -65,7 +65,7 @@ async function fetch(options: FetchOptions) { uri, method, json: true, - }, function(error, response, body) { + }, function(error, _, body) { if (error) { reject(error) return