@corva/create-app 0.84.0-2 → 0.84.0-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/flows/lib/api.js +3 -9
- package/package.json +1 -1
package/lib/flows/lib/api.js
CHANGED
|
@@ -42,21 +42,15 @@ export class Api {
|
|
|
42
42
|
* @returns {object}
|
|
43
43
|
*/
|
|
44
44
|
async getAppByKey(appKey) {
|
|
45
|
-
const { data } = await this.#api
|
|
46
|
-
.get('v2/apps', {
|
|
47
|
-
searchParams: { per_page: 2, search: appKey },
|
|
48
|
-
})
|
|
49
|
-
.json();
|
|
45
|
+
const { data } = await this.#api.get(`v2/apps/${appKey}`).json();
|
|
50
46
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (!app) {
|
|
47
|
+
if (!data) {
|
|
54
48
|
throw new StepError(
|
|
55
49
|
`App with key - ${appKey}, does not exist.\nThe key search is case-sensitive. You might need to update the app key in your app to exactly match the key.`,
|
|
56
50
|
);
|
|
57
51
|
}
|
|
58
52
|
|
|
59
|
-
return
|
|
53
|
+
return data;
|
|
60
54
|
}
|
|
61
55
|
|
|
62
56
|
/**
|