mirror of
https://github.com/ld3z/new-manga.git
synced 2026-11-09 20:23:45 -07:00
add covers to custom feeds as well as implement uniqueIds
This commit is contained in:
parent
5d4802607e
commit
16993baa78
4 changed files with 106 additions and 2 deletions
|
|
@ -103,7 +103,25 @@ import { availableLanguages, languageMap } from '../lib/api';
|
|||
function updateRSSLink() {
|
||||
const slugString = [...slugs].join(',');
|
||||
const lang = langSelect?.value || 'en';
|
||||
generateRSSLink!.setAttribute('href', `/rss/custom/${slugString}.xml?lang=${lang}`);
|
||||
|
||||
// Call the API to get a short feed ID
|
||||
fetch('/api/create-feed', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
slugs: [...slugs],
|
||||
lang
|
||||
})
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
generateRSSLink!.setAttribute('href', `/rss/${data.feedId}.xml`);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error generating short URL:', error);
|
||||
});
|
||||
}
|
||||
|
||||
function renderSlugList() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue