fix: paths for common typings folder and misc.

This commit is contained in:
Taso committed 2020-12-15 13:18:28 -05:00
1 parent 827a6c1d6e
commit 61fd8ffea6
8 files changed
+10 -11

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
import axios from 'axios';
import { Tweet, Profile } from '../../phone/src/common/interfaces/twitter';
import { Tweet, Profile } from '../../phone/src/common/typings/twitter';
import { IMAGE_DELIMITER } from '../../phone/src/apps/twitter/utils/images';
const DISCORD_TOKEN_ENV_VAR = 'discord_bot_token';
+3 -4
View File
@@ -2,7 +2,7 @@ import events from '../utils/events';
import { ESX } from './server';
import { getSource } from "./functions";
import { pool } from './db';
import { Transfer, Credentials } from '../../phone/src/common/interfaces/bank';
import { Transfer, IBankCredentials } from '../../phone/src/common/typings/bank';
import { useIdentifier } from './functions';
import { type } from 'os';
@@ -15,7 +15,7 @@ async function fetchAllTransactions(identifier: string): Promise<Transfer[]> {
return transactions;
}
function fetchCredentials(): Credentials {
function fetchCredentials(): IBankCredentials {
const name = ESX.GetPlayerFromId(getSource()).getName();
const balance = ESX.GetPlayerFromId(getSource()).getAccount('bank').money
@@ -86,11 +86,10 @@ onNet(events.BANK_FETCH_TRANSACTIONS, async () => {
onNet(events.BANK_ADD_TRANSFER, async (transfer: Transfer) => {
const xTarget = ESX.GetPlayerFromId(transfer.targetID);
const targetSource = xTarget.source;
try {
const _identifier = await useIdentifier()
const transferNotify = await addTransfer(_identifier, transfer)
emitNet(events.BANK_TRANSACTION_NOTIFICATION, targetSource, transferNotify)
emitNet(events.BANK_TRANSACTION_NOTIFICATION, xTarget, transferNotify)
emitNet(events.BANK_ADD_TRANSFER_SUCCESS, getSource());
} catch (error) {
emitNet(events.BANK_TRANSACTION_ALERT, getSource(), false)
+1 -1
View File
@@ -1,7 +1,7 @@
import md5 from 'md5';
import events from '../utils/events';
import { Message, MessageGroup, CreateMessageGroupResult } from '../../phone/src/common/interfaces/messages';
import { Message, MessageGroup, CreateMessageGroupResult } from '../../phone/src/common/typings/messages';
import { pool, withTransaction } from "./db";
import { getSource, useIdentifier } from './functions';
+1 -1
View File
@@ -1,7 +1,7 @@
import events from "../utils/events";
import { pool } from "./db";
import { useIdentifier, getSource } from "./functions";
import { Note, NoteId } from "../../phone/src/common/interfaces/notes";
import { Note, NoteId } from "../../phone/src/common/typings/notes";
async function addNote(identifier: string, note: Note): Promise<any> {
const query =
+1 -1
View File
@@ -2,7 +2,7 @@ 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 { IPhoto } from '../../phone/src/common/typings/photo';
async function uploadPhoto(identifier: string, image: string) {
const query = 'INSERT INTO npwd_phone_gallery (identifier, image) VALUES (?, ?)';
+1 -1
View File
@@ -1,7 +1,7 @@
import { pool } from "./db";
import { ESX } from "./server";
import { getSource } from "./functions";
import { Tweet, Profile } from '../../phone/src/common/interfaces/twitter';
import { Tweet, Profile } from '../../phone/src/common/typings/twitter';
import events from "../utils/events";
import config from "../utils/config";
import { reportTweetToDiscord } from './discord';