Convert most of the services view
This commit is contained in:
@@ -152,7 +152,7 @@ function create(origin, accessToken, id) {
|
||||
|
||||
return result.body.apps;
|
||||
},
|
||||
async get() {
|
||||
async get(id) {
|
||||
let error, result;
|
||||
try {
|
||||
result = await fetcher.get(`${origin}/api/v1/apps/${id}`, { access_token: accessToken });
|
||||
@@ -160,13 +160,8 @@ function create(origin, accessToken, id) {
|
||||
error = e;
|
||||
}
|
||||
|
||||
if (error || result.status !== 200) {
|
||||
console.error(`Invalid app ${id}`, error || result.status);
|
||||
this.fatalError = `Invalid app ${id}`;
|
||||
return;
|
||||
}
|
||||
|
||||
return result.body;
|
||||
if (error || result.status !== 200) return [error || result];
|
||||
return [null, result.body];
|
||||
},
|
||||
async restart() {
|
||||
let error, result;
|
||||
|
||||
Reference in New Issue
Block a user