refactor: use date-fns
This commit is contained in:
@ -4,7 +4,7 @@ import * as fs from 'fs';
|
||||
|
||||
import { queueLogger } from '../../logger';
|
||||
import { addFile } from '@/services/drive/add-file';
|
||||
import * as dateFormat from 'dateformat';
|
||||
import { format as dateFormat } from 'date-fns';
|
||||
import { getFullApAccount } from '@/misc/convert-host';
|
||||
import { Users, Mutings } from '@/models/index';
|
||||
import { MoreThan } from 'typeorm';
|
||||
@ -85,7 +85,7 @@ export async function exportMute(job: Bull.Job<DbUserJobData>, done: any): Promi
|
||||
stream.end();
|
||||
logger.succ(`Exported to: ${path}`);
|
||||
|
||||
const fileName = 'mute-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.csv';
|
||||
const fileName = 'mute-' + dateFormat(new Date(), 'yyyy-MM-dd-HH-mm-ss') + '.csv';
|
||||
const driveFile = await addFile({ user, path, name: fileName, force: true });
|
||||
|
||||
logger.succ(`Exported to: ${driveFile.id}`);
|
||||
|
Reference in New Issue
Block a user