1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-06-14 04:25:06 +02:00

refactor: Use ESM (#8358)

* wip

* wip

* fix

* clean up

* Update tsconfig.json

* Update activitypub.ts

* wip
This commit is contained in:
syuilo
2022-02-27 11:07:39 +09:00
committed by GitHub
parent 0a882471f3
commit d071d18dd7
737 changed files with 4135 additions and 3678 deletions

View File

@@ -1,14 +1,14 @@
import * as Koa from 'koa';
import Koa from 'koa';
import summaly from 'summaly';
import { fetchMeta } from '@/misc/fetch-meta';
import Logger from '@/services/logger';
import config from '@/config/index';
import { query } from '@/prelude/url';
import { getJson } from '@/misc/fetch';
import { fetchMeta } from '@/misc/fetch-meta.js';
import Logger from '@/services/logger.js';
import config from '@/config/index.js';
import { query } from '@/prelude/url.js';
import { getJson } from '@/misc/fetch.js';
const logger = new Logger('url-preview');
module.exports = async (ctx: Koa.Context) => {
export const urlPreviewHandler = async (ctx: Koa.Context) => {
const url = ctx.query.url;
if (typeof url !== 'string') {
ctx.status = 400;