Manga database classes, api url change, fix source id

This commit is contained in:
Aria Moradi
2020-12-25 17:16:26 +03:30
parent 5597ad66b4
commit ab33a0ef1d
12 changed files with 105 additions and 22 deletions

View File

@@ -15,7 +15,7 @@ function Extensions() {
if (extensions.length === 0) {
mapped = <h3>wait</h3>;
fetch('http://127.0.0.1:4567/api/v1/extensions')
fetch('http://127.0.0.1:4567/api/v1/extension/list')
.then((response) => response.json())
.then((data) => setExtensions(data));
} else {
@@ -31,7 +31,7 @@ function Sources() {
if (sources.length === 0) {
mapped = <h3>wait</h3>;
fetch('http://127.0.0.1:4567/api/v1/sources')
fetch('http://127.0.0.1:4567/api/v1/source/list')
.then((response) => response.json())
.then((data) => setSources(data));
} else {

View File

@@ -49,7 +49,7 @@ export default function ExtensionCard(props: IProps) {
function install() {
setInstalledState('installing');
fetch(`http://127.0.0.1:4567/api/v1/extensions/install/${apkName}`).then(() => {
fetch(`http://127.0.0.1:4567/api/v1/extension/install/${apkName}`).then(() => {
setInstalledState('installed');
});
}