@corva/create-app 0.84.0-2 → 0.84.0-rc.0

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.
@@ -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
- const app = data.find((app) => app.attributes.app_key === appKey);
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 app;
53
+ return data;
60
54
  }
61
55
 
62
56
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/create-app",
3
- "version": "0.84.0-2",
3
+ "version": "0.84.0-rc.0",
4
4
  "private": false,
5
5
  "description": "Create an app to use it in CORVA.AI",
6
6
  "keywords": [