mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
feat: load dotenv in script/trends.ts
This commit is contained in:
parent
7c29c81226
commit
e7f5e563f5
1 changed files with 7 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import * as dotenv from '@std/dotenv';
|
||||
import { z } from 'zod';
|
||||
|
||||
import {
|
||||
|
|
@ -8,6 +9,12 @@ import {
|
|||
updateTrendingZappedEvents,
|
||||
} from '@/trends.ts';
|
||||
|
||||
await dotenv.load({
|
||||
export: true,
|
||||
defaultsPath: null,
|
||||
examplePath: null,
|
||||
});
|
||||
|
||||
const trendSchema = z.enum(['pubkeys', 'zapped_events', 'events', 'hashtags', 'links']);
|
||||
const trends = trendSchema.array().parse(Deno.args);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue