From a494f5225ad203cf10588a17c0e789f32d582272 Mon Sep 17 00:00:00 2001 From: Christopher Date: Sun, 3 Jan 2021 21:42:56 +0100 Subject: [PATCH] cleanup phots --- resources/server/sv_photo.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/resources/server/sv_photo.ts b/resources/server/sv_photo.ts index a910ee4..bfe6c69 100644 --- a/resources/server/sv_photo.ts +++ b/resources/server/sv_photo.ts @@ -1,8 +1,8 @@ import events from '../utils/events'; -import { ESX, getSource } from './server'; -import { pool } from './db'; -import { useIdentifier } from './functions'; -import { IPhoto } from '../../phone/src/common/interfaces/photo'; +import {getSource} from './server'; +import {pool} from './db'; +import {useIdentifier} from './functions'; +import {IPhoto} from '../../phone/src/common/typings/photo'; async function uploadPhoto(identifier: string, image: string) { const query = 'INSERT INTO npwd_phone_gallery (identifier, image) VALUES (?, ?)'; @@ -12,8 +12,7 @@ async function uploadPhoto(identifier: string, image: string) { async function getPhotosByIdentifier(identifier: string): Promise { const query = "SELECT id, image FROM npwd_phone_gallery WHERE identifier = ? ORDER BY id DESC"; const [ results ] = await pool.query(query, [identifier]); - const photos = results; - return photos; + return results; } async function deletePhoto(photo: IPhoto, identifier: string) {