From 0efc9c38a4963e79acd3555a1ff83ab2cea1d22d Mon Sep 17 00:00:00 2001 From: Orca1110 Date: Fri, 30 Sep 2022 17:12:44 +0900 Subject: [PATCH] :goal_net: Lint Error Catching #315 --- api/fcm/index.ts | 5 +++-- screens/CreateMsgScreen.tsx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/fcm/index.ts b/api/fcm/index.ts index 65ef80a..ce352de 100644 --- a/api/fcm/index.ts +++ b/api/fcm/index.ts @@ -1,5 +1,5 @@ import client from '../client'; -import {SingleAlert, FCMParams} from './types'; +import {SingleAlert, FCMParams, MultiAlert} from './types'; export async function sendFCMToken(params: FCMParams) { const response = await client.post('/fcmToken', params); @@ -8,10 +8,11 @@ export async function sendFCMToken(params: FCMParams) { export async function sendSingleAlarm(params: SingleAlert) { const response = await client.post('/api/fcm/welcome', params); + console.log('Welcome API Worked!'); return response.config.data; } -export async function sendMultiAlarm(params: number) { +export async function sendMultiAlarm(params: MultiAlert) { const response = await client.post('/api/fcm/submit', params); console.log('Pool User ID Received!'); return response.config.data; diff --git a/screens/CreateMsgScreen.tsx b/screens/CreateMsgScreen.tsx index 3024cd4..7bacfbe 100644 --- a/screens/CreateMsgScreen.tsx +++ b/screens/CreateMsgScreen.tsx @@ -98,7 +98,7 @@ function CreateMessageScreen() { create(formData); // onSuccessSubmit(); send({brand_id: id?.poolUserId as number}); - }, [create, form]); + }, [create, form, id?.poolUserId]); // const onSuccessSubmit = () => { // send(id?.poolUserId as number);