File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1- import { rss3Ums , json , RSS , Atom } from '@/utils/render' ;
1+ import { rss3 , json , RSS , Atom } from '@/utils/render' ;
22import { config } from '@/config' ;
33import { collapseWhitespace , convertDateToISO8601 } from '@/utils/common-utils' ;
44import type { MiddlewareHandler } from 'hono' ;
@@ -94,8 +94,9 @@ const middleware: MiddlewareHandler = async (ctx, next) => {
9494 return ctx . json ( result ) ;
9595 }
9696
97- if ( outputType === 'ums' ) {
98- return ctx . json ( rss3Ums ( result ) ) ;
97+ // retain .ums for backward compatibility
98+ if ( outputType === 'ums' || outputType === 'rss3' ) {
99+ return ctx . json ( rss3 ( result ) ) ;
99100 } else if ( outputType === 'json' ) {
100101 ctx . header ( 'Content-Type' , 'application/feed+json; charset=UTF-8' ) ;
101102 return ctx . body ( json ( result ) ) ;
Original file line number Diff line number Diff line change 1- export { default as rss3Ums } from '@/views/rss3-ums ' ;
1+ export { default as rss3 } from '@/views/rss3' ;
22export { default as json } from '@/views/json' ;
33export { default as RSS } from '@/views/rss' ;
44export { default as Atom } from '@/views/atom' ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const NETWORK = 'RSS';
1010const TAG = 'RSS' ;
1111const TYPE = 'feed' ;
1212
13- const rss3Ums = ( data ) => {
13+ const rss3 = ( data ) => {
1414 const currentUnixTsp = dayjs ( ) . unix ( ) ;
1515 const umsResult = {
1616 data : data . item . map ( ( item ) => {
@@ -59,4 +59,4 @@ function getOwnershipFieldFromURL(item) {
5959 }
6060}
6161
62- export default rss3Ums ;
62+ export default rss3 ;
You can’t perform that action at this time.
0 commit comments