mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-06-30 23:38:01 +09:00
Fix: cause 500 when no url (#129)
This commit is contained in:
@ -5,6 +5,11 @@ import summaly from '../';
|
||||
const app = new Koa();
|
||||
|
||||
app.use(async ctx => {
|
||||
if (!ctx.query.url) {
|
||||
ctx.status = 400;
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const summary = await summaly(ctx.query.url, {
|
||||
followRedirects: false
|
||||
|
Reference in New Issue
Block a user