refactor & support for extension update: Backend

This commit is contained in:
Aria Moradi
2021-03-29 00:35:21 +04:30
parent b1b1abad1d
commit 077bbc3c38
34 changed files with 244 additions and 252 deletions
+3 -3
View File
@@ -49,7 +49,7 @@ interface IProps {
export default function ExtensionCard(props: IProps) {
const {
extension: {
name, lang, versionName, installed, apkName, iconUrl,
name, lang, versionName, installed, pkgName, iconUrl,
},
notifyInstall,
} = props;
@@ -62,7 +62,7 @@ export default function ExtensionCard(props: IProps) {
function install() {
setInstalledState('installing');
client.get(`/api/v1/extension/install/${apkName}`)
client.get(`/api/v1/extension/install/${pkgName}`)
.then(() => {
setInstalledState('uninstall');
notifyInstall();
@@ -71,7 +71,7 @@ export default function ExtensionCard(props: IProps) {
function uninstall() {
setInstalledState('uninstalling');
client.get(`/api/v1/extension/uninstall/${apkName}`)
client.get(`/api/v1/extension/uninstall/${pkgName}`)
.then(() => {
// setInstalledState('install');
notifyInstall();