1 Commits

Author SHA1 Message Date
f4a180907c 3.0.2 2023-02-12 12:29:17 +00:00
4 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
3.0.2 / 2023-02-12
------------------
* Fastifyのルーティングを'/'から'*'に
3.0.1 / 2023-02-12 3.0.1 / 2023-02-12
------------------ ------------------
* ES Moduleになりました * ES Moduleになりました

View File

@ -22,7 +22,7 @@ summaly(url[, opts])
``` ```
As Fastify plugin: As Fastify plugin:
(will listen `GET` of `/url`) (will listen `GET` of `/`)
```javascript ```javascript
import Summaly from 'summaly'; import Summaly from 'summaly';

View File

@ -43,7 +43,7 @@ export const summaly = async (url, options) => {
}); });
}; };
export default function (fastify, options, done) { export default function (fastify, options, done) {
fastify.get('/url', async (req, reply) => { fastify.get('/', async (req, reply) => {
const url = req.query.url; const url = req.query.url;
if (url == null) { if (url == null) {
return reply.status(400).send({ return reply.status(400).send({

View File

@ -92,7 +92,7 @@ export default function (fastify: FastifyInstance, options: Options, done: (err?
url?: string; url?: string;
lang?: string; lang?: string;
}; };
}>('/url', async (req, reply) => { }>('/', async (req, reply) => {
const url = req.query.url as string; const url = req.query.url as string;
if (url == null) { if (url == null) {
return reply.status(400).send({ return reply.status(400).send({