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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user