removed more stuff
This commit is contained in:
parent
2d14bb87f9
commit
566f5dac92
2 changed files with 29 additions and 52 deletions
|
|
@ -1,10 +1,16 @@
|
|||
import { getRandomUserAgent } from '@stock-bot/utils';
|
||||
import type { CeoHandler } from '../ceo.handler';
|
||||
|
||||
interface ProcessIndividualSymbolPayload {
|
||||
ceoId: string;
|
||||
symbol: string;
|
||||
timestamp?: string;
|
||||
}
|
||||
|
||||
export async function processIndividualSymbol(
|
||||
this: CeoHandler,
|
||||
payload: any,
|
||||
_context: any
|
||||
payload: ProcessIndividualSymbolPayload,
|
||||
_context: unknown
|
||||
): Promise<unknown> {
|
||||
const { ceoId, symbol, timestamp } = payload;
|
||||
const proxy = this.proxy?.getProxy();
|
||||
|
|
@ -42,7 +48,27 @@ export async function processIndividualSymbol(
|
|||
return null; // No data to process
|
||||
}
|
||||
const latestSpielTime = data.spiels[0]?.timestamp;
|
||||
const posts = data.spiels.map((spiel: any) => ({
|
||||
interface Spiel {
|
||||
spiel: string;
|
||||
spiel_reply_to_id: string;
|
||||
spiel_reply_to: string;
|
||||
spiel_reply_to_name: string;
|
||||
spiel_reply_to_edited: boolean;
|
||||
user_id: string;
|
||||
name: string;
|
||||
timestamp: string;
|
||||
spiel_id: string;
|
||||
color: string;
|
||||
parent_id: string;
|
||||
public_id: string;
|
||||
parent_channel: string;
|
||||
parent_timestamp: string;
|
||||
votes: number;
|
||||
editable: boolean;
|
||||
edited: boolean;
|
||||
}
|
||||
|
||||
const posts = data.spiels.map((spiel: Spiel) => ({
|
||||
ceoId,
|
||||
spiel: spiel.spiel,
|
||||
spielReplyToId: spiel.spiel_reply_to_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue