mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
fix(types): Fixed incorrectly referenced type
This commit is contained in:
1 parent
b5fca6b35b
commit
390319deda
2 files changed
+3
-3
No files matched your search
@@ -1,4 +1,4 @@
|
|||||||
import { IPhoto, PhotoEvents } from '../../typings/photo';
|
import { GalleryPhoto, PhotoEvents } from '../../typings/photo';
|
||||||
import { Delay } from '../utils/fivem';
|
import { Delay } from '../utils/fivem';
|
||||||
import { sendMessage, sendCameraEvent } from '../utils/messages';
|
import { sendMessage, sendCameraEvent } from '../utils/messages';
|
||||||
import { PhoneEvents } from '../../typings/phone';
|
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) {
|
if (photo && photo.image) {
|
||||||
return sendCameraEvent(PhotoEvents.TAKE_PHOTO_SUCCESS, photo);
|
return sendCameraEvent(PhotoEvents.TAKE_PHOTO_SUCCESS, photo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { mainLogger } from './sv_logger';
|
|||||||
|
|
||||||
const photoLogger = mainLogger.child({ module: 'photo' });
|
const photoLogger = mainLogger.child({ module: 'photo' });
|
||||||
|
|
||||||
async function uploadPhoto(identifier: string, image: string): Promise<IPhoto> {
|
async function uploadPhoto(identifier: string, image: string): Promise<GalleryPhoto> {
|
||||||
const query = 'INSERT INTO npwd_phone_gallery (identifier, image) VALUES (?, ?)';
|
const query = 'INSERT INTO npwd_phone_gallery (identifier, image) VALUES (?, ?)';
|
||||||
const [results] = (await pool.query(query, [identifier, image])) as any;
|
const [results] = (await pool.query(query, [identifier, image])) as any;
|
||||||
return { id: results.insertId, image };
|
return { id: results.insertId, image };
|
||||||
|
|||||||
Reference in new issue
Block a user