This commit is contained in:
甘瀬ここあ 2024-11-21 17:24:18 +09:00 committed by GitHub
commit 8518a5271b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import Parser from 'rss-parser';
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js'; import { Endpoint } from '@/server/api/endpoint-base.js';
import { HttpRequestService } from '@/core/HttpRequestService.js'; import { HttpRequestService } from '@/core/HttpRequestService.js';
import { URL } from 'url';
const rssParser = new Parser(); const rssParser = new Parser();
@ -219,7 +220,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private httpRequestService: HttpRequestService, private httpRequestService: HttpRequestService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const res = await this.httpRequestService.send(ps.url, { const res = await this.httpRequestService.send(decodeURIComponent(ps.url), {
method: 'GET', method: 'GET',
headers: { headers: {
Accept: 'application/rss+xml, */*', Accept: 'application/rss+xml, */*',