refactor: use date-fns

This commit is contained in:
syuilo
2022-02-04 01:56:33 +09:00
parent 7168811283
commit 9ee0db95ac
10 changed files with 17 additions and 29 deletions

View File

@ -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}`);