mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-23 22:13:07 +02:00
chore: lint
This commit is contained in:
parent
37d7a4b604
commit
60b2842203
2 changed files with 7 additions and 7 deletions
|
@ -46,12 +46,12 @@ export class MastodonApiServerService {
|
|||
done();
|
||||
});
|
||||
|
||||
fastify.addContentTypeParser('application/x-www-form-urlencoded', function (request, payload, done) {
|
||||
fastify.addContentTypeParser('application/x-www-form-urlencoded', (request, payload, done) => {
|
||||
let body = '';
|
||||
payload.on('data', function (data) {
|
||||
payload.on('data', (data) => {
|
||||
body += data;
|
||||
});
|
||||
payload.on('end', function () {
|
||||
payload.on('end', () => {
|
||||
try {
|
||||
const parsed = querystring.parse(body);
|
||||
done(null, parsed);
|
||||
|
|
|
@ -51,12 +51,12 @@ export class OAuth2ProviderService {
|
|||
done();
|
||||
});
|
||||
|
||||
fastify.addContentTypeParser('application/x-www-form-urlencoded', function (request, payload, done) {
|
||||
fastify.addContentTypeParser('application/x-www-form-urlencoded', (request, payload, done) => {
|
||||
let body = '';
|
||||
payload.on('data', function (data) {
|
||||
payload.on('data', (data) => {
|
||||
body += data;
|
||||
});
|
||||
payload.on('end', function () {
|
||||
payload.on('end', () => {
|
||||
try {
|
||||
const parsed = querystring.parse(body);
|
||||
done(null, parsed);
|
||||
|
@ -122,7 +122,7 @@ export class OAuth2ProviderService {
|
|||
};
|
||||
reply.send(ret);
|
||||
} catch (err: any) {
|
||||
console.error(err);
|
||||
/* console.error(err); */
|
||||
reply.code(401).send(err.response.data);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue