chore: fix lint
This commit is contained in:
parent
ad1d3ccb75
commit
8f997c39c9
1 changed files with 3 additions and 3 deletions
|
@ -45,14 +45,14 @@ export class MastodonApiServerService {
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
fastify.addContentTypeParser(['application/x-www-form-urlencoded'], { parseAs: 'string' }, function (req, body, done) {
|
fastify.addContentTypeParser(['application/x-www-form-urlencoded'], { parseAs: 'string' }, (req, body, done) => {
|
||||||
const dataObj = {};
|
const dataObj = {};
|
||||||
const parsedData = new URLSearchParams(body as string);
|
const parsedData = new URLSearchParams(body as string);
|
||||||
for (var pair of parsedData.entries()) {
|
for (let pair of parsedData.entries()) {
|
||||||
//@ts-expect-error
|
//@ts-expect-error
|
||||||
dataObj[pair[0]] = pair[1];
|
dataObj[pair[0]] = pair[1];
|
||||||
}
|
}
|
||||||
done(null, dataObj)
|
done(null, dataObj);
|
||||||
});
|
});
|
||||||
|
|
||||||
fastify.register(multer.contentParser);
|
fastify.register(multer.contentParser);
|
||||||
|
|
Loading…
Reference in a new issue