Very basic installation works again
This commit is contained in:
@@ -84,6 +84,36 @@ function create(origin, accessToken, id) {
|
||||
return {
|
||||
name: 'AppsModel',
|
||||
getTask,
|
||||
async install(manifest, config) {
|
||||
const data = {
|
||||
appStoreId: manifest.id + '@' + manifest.version,
|
||||
subdomain: config.subdomain,
|
||||
domain: config.domain,
|
||||
secondaryDomains: config.secondaryDomains,
|
||||
ports: config.ports,
|
||||
accessRestriction: config.accessRestriction,
|
||||
cert: config.cert,
|
||||
key: config.key,
|
||||
sso: config.sso,
|
||||
overwriteDns: config.overwriteDns,
|
||||
upstreamUri: config.upstreamUri,
|
||||
backupId: config.backupId // when restoring from archive
|
||||
};
|
||||
|
||||
let error, result;
|
||||
try {
|
||||
result = await fetcher.post(`${origin}/api/v1/apps`, data, { access_token: accessToken });
|
||||
} catch (e) {
|
||||
error = e;
|
||||
}
|
||||
|
||||
if (error || result.status !== 202) {
|
||||
console.error('Failed to install app.', error || result.status);
|
||||
return error || result.body;
|
||||
}
|
||||
|
||||
return '';
|
||||
},
|
||||
async list() {
|
||||
let error, result;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user