From 390319dedad75058ed406bbd8bd9862ac022692e Mon Sep 17 00:00:00 2001 From: Taso Date: Sun, 11 Apr 2021 10:32:31 -0400 Subject: [PATCH] fix(types): Fixed incorrectly referenced type --- resources/client/cl_photo.ts | 4 ++-- resources/server/sv_photo.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/client/cl_photo.ts b/resources/client/cl_photo.ts index b13ecca..ac8de0f 100644 --- a/resources/client/cl_photo.ts +++ b/resources/client/cl_photo.ts @@ -1,4 +1,4 @@ -import { IPhoto, PhotoEvents } from '../../typings/photo'; +import { GalleryPhoto, PhotoEvents } from '../../typings/photo'; import { Delay } from '../utils/fivem'; import { sendMessage, sendCameraEvent } from '../utils/messages'; import { PhoneEvents } from '../../typings/phone'; @@ -107,7 +107,7 @@ function takePhoto() { ); } -onNet(PhotoEvents.UPLOAD_PHOTO_SUCCESS, (photo: IPhoto) => { +onNet(PhotoEvents.UPLOAD_PHOTO_SUCCESS, (photo: GalleryPhoto) => { if (photo && photo.image) { return sendCameraEvent(PhotoEvents.TAKE_PHOTO_SUCCESS, photo); } diff --git a/resources/server/sv_photo.ts b/resources/server/sv_photo.ts index 6d2dc0d..dabe839 100644 --- a/resources/server/sv_photo.ts +++ b/resources/server/sv_photo.ts @@ -5,7 +5,7 @@ import { mainLogger } from './sv_logger'; const photoLogger = mainLogger.child({ module: 'photo' }); -async function uploadPhoto(identifier: string, image: string): Promise { +async function uploadPhoto(identifier: string, image: string): Promise { const query = 'INSERT INTO npwd_phone_gallery (identifier, image) VALUES (?, ?)'; const [results] = (await pool.query(query, [identifier, image])) as any; return { id: results.insertId, image };