chore: lint

This commit is contained in:
Mar0xy 2023-09-24 23:25:04 +02:00
parent 37d7a4b604
commit 60b2842203
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
2 changed files with 7 additions and 7 deletions

View File

@ -46,12 +46,12 @@ export class MastodonApiServerService {
done(); done();
}); });
fastify.addContentTypeParser('application/x-www-form-urlencoded', function (request, payload, done) { fastify.addContentTypeParser('application/x-www-form-urlencoded', (request, payload, done) => {
let body = ''; let body = '';
payload.on('data', function (data) { payload.on('data', (data) => {
body += data; body += data;
}); });
payload.on('end', function () { payload.on('end', () => {
try { try {
const parsed = querystring.parse(body); const parsed = querystring.parse(body);
done(null, parsed); done(null, parsed);

View File

@ -51,12 +51,12 @@ export class OAuth2ProviderService {
done(); done();
}); });
fastify.addContentTypeParser('application/x-www-form-urlencoded', function (request, payload, done) { fastify.addContentTypeParser('application/x-www-form-urlencoded', (request, payload, done) => {
let body = ''; let body = '';
payload.on('data', function (data) { payload.on('data', (data) => {
body += data; body += data;
}); });
payload.on('end', function () { payload.on('end', () => {
try { try {
const parsed = querystring.parse(body); const parsed = querystring.parse(body);
done(null, parsed); done(null, parsed);
@ -122,7 +122,7 @@ export class OAuth2ProviderService {
}; };
reply.send(ret); reply.send(ret);
} catch (err: any) { } catch (err: any) {
console.error(err); /* console.error(err); */
reply.code(401).send(err.response.data); reply.code(401).send(err.response.data);
} }
}); });