Plugins fixed (#903)
* test * fast fix * fix * fix * Update ranobelib.ts
This commit is contained in:
@@ -10,7 +10,7 @@ class ficbook implements Plugin.PluginBase {
|
||||
id = 'ficbook';
|
||||
name = 'ficbook';
|
||||
site = 'https://ficbook.net';
|
||||
version = '1.0.0';
|
||||
version = '1.0.1';
|
||||
icon = 'src/ru/ficbook/icon.png';
|
||||
|
||||
async popularNovels(
|
||||
@@ -149,14 +149,17 @@ class ficbook implements Plugin.PluginBase {
|
||||
formData.append('term', searchTerm);
|
||||
formData.append('page', pageNo.toString());
|
||||
|
||||
const result = await fetchApi(this.site + '/search/fanfic', {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
});
|
||||
const json = (await result.json()) as { data: Data };
|
||||
const { data }: { data: Data } = await fetchApi(
|
||||
this.site + '/search/fanfic',
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
},
|
||||
).then(res => res.json());
|
||||
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
json.data?.data?.forEach(novel => {
|
||||
data?.data?.forEach(novel => {
|
||||
const name = novel.title.trim();
|
||||
const path = '/readfic/' + novel.slug;
|
||||
const cover = novel.cover
|
||||
|
||||
Reference in New Issue
Block a user