fix: missing vendor infos #565
@ -13,6 +13,7 @@ import DeimosProspectorVendorManifest from "@/static/fixed_responses/getVendorIn
|
|||||||
|
|||||||
import DuviriAcrithisVendorManifest from "@/static/fixed_responses/getVendorInfo/DuviriAcrithisVendorManifest.json";
|
import DuviriAcrithisVendorManifest from "@/static/fixed_responses/getVendorInfo/DuviriAcrithisVendorManifest.json";
|
||||||
import EntratiLabsEntratiLabsCommisionsManifest from "@/static/fixed_responses/getVendorInfo/EntratiLabsEntratiLabsCommisionsManifest.json";
|
import EntratiLabsEntratiLabsCommisionsManifest from "@/static/fixed_responses/getVendorInfo/EntratiLabsEntratiLabsCommisionsManifest.json";
|
||||||
import EntratiLabsEntratiLabVendorManifest from "@/static/fixed_responses/getVendorInfo/EntratiLabsEntratiLabVendorManifest.json";
|
import EntratiLabsEntratiLabVendorManifest from "@/static/fixed_responses/getVendorInfo/EntratiLabsEntratiLabVendorManifest.json";
|
||||||
|
import HubsIronwakeDondaVendorManifest from "@/static/fixed_responses/getVendorInfo/HubsIronwakeDondaVendorManifest.json";
|
||||||
![]() ⚠️ Potential issue Correct the import paths for Ostron manifests The imports for Apply this diff to correct the import paths:
📝 Committable suggestion
_:warning: Potential issue_
**Correct the import paths for Ostron manifests**
The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.
Apply this diff to correct the import paths:
```diff
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
```
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
![]() 🛠️ Refactor suggestion Consider refactoring the switch statement for better maintainability The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement:
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
_:hammer_and_wrench: Refactor suggestion_
**Consider refactoring the switch statement for better maintainability**
The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.
Here's an example of how you might refactor the switch statement:
```diff
+const vendorManifestMap: { [key: string]: any } = {
+ "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+ // Include all other vendor paths and their corresponding manifests
+};
export const getVendorInfoController: RequestHandler = (req, res) => {
- switch (req.query.vendor as string) {
- case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
- res.json(OstronFishmongerVendorManifest);
- break;
- case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
- res.json(OstronProspectorVendorManifest);
- break;
- // ... other cases ...
- default:
- throw new Error(`Unknown vendor: ${req.query.vendor}`);
- }
+ const vendorPath = req.query.vendor as string;
+ const manifest = vendorManifestMap[vendorPath];
+ if (manifest) {
+ res.json(manifest);
+ } else {
+ throw new Error(`Unknown vendor: ${vendorPath}`);
+ }
};
```
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
> Committable suggestion was skipped due to low confidence.
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
import HubsRailjackCrewMemberVendorManifest from "@/static/fixed_responses/getVendorInfo/HubsRailjackCrewMemberVendorManifest.json";
|
import HubsRailjackCrewMemberVendorManifest from "@/static/fixed_responses/getVendorInfo/HubsRailjackCrewMemberVendorManifest.json";
|
||||||
import MaskSalesmanManifest from "@/static/fixed_responses/getVendorInfo/MaskSalesmanManifest.json";
|
import MaskSalesmanManifest from "@/static/fixed_responses/getVendorInfo/MaskSalesmanManifest.json";
|
||||||
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
|
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
|
||||||
@ -102,6 +103,10 @@ export const getVendorInfoController: RequestHandler = (req, res) => {
|
|||||||
![]() ⚠️ Potential issue Correct the import paths for Ostron manifests The imports for Apply this diff to correct the import paths:
📝 Committable suggestion
_:warning: Potential issue_
**Correct the import paths for Ostron manifests**
The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.
Apply this diff to correct the import paths:
```diff
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
```
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
![]() 🛠️ Refactor suggestion Consider refactoring the switch statement for better maintainability The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement:
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
_:hammer_and_wrench: Refactor suggestion_
**Consider refactoring the switch statement for better maintainability**
The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.
Here's an example of how you might refactor the switch statement:
```diff
+const vendorManifestMap: { [key: string]: any } = {
+ "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+ // Include all other vendor paths and their corresponding manifests
+};
export const getVendorInfoController: RequestHandler = (req, res) => {
- switch (req.query.vendor as string) {
- case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
- res.json(OstronFishmongerVendorManifest);
- break;
- case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
- res.json(OstronProspectorVendorManifest);
- break;
- // ... other cases ...
- default:
- throw new Error(`Unknown vendor: ${req.query.vendor}`);
- }
+ const vendorPath = req.query.vendor as string;
+ const manifest = vendorManifestMap[vendorPath];
+ if (manifest) {
+ res.json(manifest);
+ } else {
+ throw new Error(`Unknown vendor: ${vendorPath}`);
+ }
};
```
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
> Committable suggestion was skipped due to low confidence.
<!-- This is an auto-generated comment by CodeRabbit -->
![]() ⚠️ Potential issue Correct the import paths for Ostron manifests The imports for Apply this diff to correct the import paths:
📝 Committable suggestion
_:warning: Potential issue_
**Correct the import paths for Ostron manifests**
The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.
Apply this diff to correct the import paths:
```diff
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
```
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
![]() 🛠️ Refactor suggestion Consider refactoring the switch statement for better maintainability The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement:
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
_:hammer_and_wrench: Refactor suggestion_
**Consider refactoring the switch statement for better maintainability**
The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.
Here's an example of how you might refactor the switch statement:
```diff
+const vendorManifestMap: { [key: string]: any } = {
+ "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+ // Include all other vendor paths and their corresponding manifests
+};
export const getVendorInfoController: RequestHandler = (req, res) => {
- switch (req.query.vendor as string) {
- case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
- res.json(OstronFishmongerVendorManifest);
- break;
- case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
- res.json(OstronProspectorVendorManifest);
- break;
- // ... other cases ...
- default:
- throw new Error(`Unknown vendor: ${req.query.vendor}`);
- }
+ const vendorPath = req.query.vendor as string;
+ const manifest = vendorManifestMap[vendorPath];
+ if (manifest) {
+ res.json(manifest);
+ } else {
+ throw new Error(`Unknown vendor: ${vendorPath}`);
+ }
};
```
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
> Committable suggestion was skipped due to low confidence.
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
res.json(DeimosHivemindTokenVendorManifest);
|
res.json(DeimosHivemindTokenVendorManifest);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "/Lotus/Types/Game/VendorManifests/Hubs/IronwakeDondaVendorManifest":
|
||||||
![]() ⚠️ Potential issue Correct the import paths for Ostron manifests The imports for Apply this diff to correct the import paths:
📝 Committable suggestion
_:warning: Potential issue_
**Correct the import paths for Ostron manifests**
The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.
Apply this diff to correct the import paths:
```diff
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
```
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
![]() 🛠️ Refactor suggestion Consider refactoring the switch statement for better maintainability The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement:
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
_:hammer_and_wrench: Refactor suggestion_
**Consider refactoring the switch statement for better maintainability**
The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.
Here's an example of how you might refactor the switch statement:
```diff
+const vendorManifestMap: { [key: string]: any } = {
+ "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+ // Include all other vendor paths and their corresponding manifests
+};
export const getVendorInfoController: RequestHandler = (req, res) => {
- switch (req.query.vendor as string) {
- case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
- res.json(OstronFishmongerVendorManifest);
- break;
- case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
- res.json(OstronProspectorVendorManifest);
- break;
- // ... other cases ...
- default:
- throw new Error(`Unknown vendor: ${req.query.vendor}`);
- }
+ const vendorPath = req.query.vendor as string;
+ const manifest = vendorManifestMap[vendorPath];
+ if (manifest) {
+ res.json(manifest);
+ } else {
+ throw new Error(`Unknown vendor: ${vendorPath}`);
+ }
};
```
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
> Committable suggestion was skipped due to low confidence.
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
res.json(HubsIronwakeDondaVendorManifest);
|
||||||
![]() ⚠️ Potential issue Correct the import paths for Ostron manifests The imports for Apply this diff to correct the import paths:
📝 Committable suggestion
_:warning: Potential issue_
**Correct the import paths for Ostron manifests**
The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.
Apply this diff to correct the import paths:
```diff
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
```
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
![]() 🛠️ Refactor suggestion Consider refactoring the switch statement for better maintainability The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement:
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
_:hammer_and_wrench: Refactor suggestion_
**Consider refactoring the switch statement for better maintainability**
The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.
Here's an example of how you might refactor the switch statement:
```diff
+const vendorManifestMap: { [key: string]: any } = {
+ "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+ // Include all other vendor paths and their corresponding manifests
+};
export const getVendorInfoController: RequestHandler = (req, res) => {
- switch (req.query.vendor as string) {
- case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
- res.json(OstronFishmongerVendorManifest);
- break;
- case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
- res.json(OstronProspectorVendorManifest);
- break;
- // ... other cases ...
- default:
- throw new Error(`Unknown vendor: ${req.query.vendor}`);
- }
+ const vendorPath = req.query.vendor as string;
+ const manifest = vendorManifestMap[vendorPath];
+ if (manifest) {
+ res.json(manifest);
+ } else {
+ throw new Error(`Unknown vendor: ${vendorPath}`);
+ }
};
```
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
> Committable suggestion was skipped due to low confidence.
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
break;
|
||||||
![]() ⚠️ Potential issue Correct the import paths for Ostron manifests The imports for Apply this diff to correct the import paths:
📝 Committable suggestion
_:warning: Potential issue_
**Correct the import paths for Ostron manifests**
The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.
Apply this diff to correct the import paths:
```diff
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
```
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
![]() 🛠️ Refactor suggestion Consider refactoring the switch statement for better maintainability The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement:
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
_:hammer_and_wrench: Refactor suggestion_
**Consider refactoring the switch statement for better maintainability**
The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.
Here's an example of how you might refactor the switch statement:
```diff
+const vendorManifestMap: { [key: string]: any } = {
+ "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+ // Include all other vendor paths and their corresponding manifests
+};
export const getVendorInfoController: RequestHandler = (req, res) => {
- switch (req.query.vendor as string) {
- case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
- res.json(OstronFishmongerVendorManifest);
- break;
- case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
- res.json(OstronProspectorVendorManifest);
- break;
- // ... other cases ...
- default:
- throw new Error(`Unknown vendor: ${req.query.vendor}`);
- }
+ const vendorPath = req.query.vendor as string;
+ const manifest = vendorManifestMap[vendorPath];
+ if (manifest) {
+ res.json(manifest);
+ } else {
+ throw new Error(`Unknown vendor: ${vendorPath}`);
+ }
};
```
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
> Committable suggestion was skipped due to low confidence.
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
|
||||||
![]() ⚠️ Potential issue Correct the import paths for Ostron manifests The imports for Apply this diff to correct the import paths:
📝 Committable suggestion
_:warning: Potential issue_
**Correct the import paths for Ostron manifests**
The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.
Apply this diff to correct the import paths:
```diff
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
```
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
![]() 🛠️ Refactor suggestion Consider refactoring the switch statement for better maintainability The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement:
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
_:hammer_and_wrench: Refactor suggestion_
**Consider refactoring the switch statement for better maintainability**
The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.
Here's an example of how you might refactor the switch statement:
```diff
+const vendorManifestMap: { [key: string]: any } = {
+ "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+ // Include all other vendor paths and their corresponding manifests
+};
export const getVendorInfoController: RequestHandler = (req, res) => {
- switch (req.query.vendor as string) {
- case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
- res.json(OstronFishmongerVendorManifest);
- break;
- case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
- res.json(OstronProspectorVendorManifest);
- break;
- // ... other cases ...
- default:
- throw new Error(`Unknown vendor: ${req.query.vendor}`);
- }
+ const vendorPath = req.query.vendor as string;
+ const manifest = vendorManifestMap[vendorPath];
+ if (manifest) {
+ res.json(manifest);
+ } else {
+ throw new Error(`Unknown vendor: ${vendorPath}`);
+ }
};
```
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
> Committable suggestion was skipped due to low confidence.
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
case "/Lotus/Types/Game/VendorManifests/Zariman/ArchimedeanVendorManifest":
|
case "/Lotus/Types/Game/VendorManifests/Zariman/ArchimedeanVendorManifest":
|
||||||
res.json(ArchimedeanVendorManifest);
|
res.json(ArchimedeanVendorManifest);
|
||||||
break;
|
break;
|
||||||
|
|||||||
![]() ⚠️ Potential issue Correct the import paths for Ostron manifests The imports for Apply this diff to correct the import paths:
📝 Committable suggestion
_:warning: Potential issue_
**Correct the import paths for Ostron manifests**
The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.
Apply this diff to correct the import paths:
```diff
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
```
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
![]() 🛠️ Refactor suggestion Consider refactoring the switch statement for better maintainability The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement:
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
_:hammer_and_wrench: Refactor suggestion_
**Consider refactoring the switch statement for better maintainability**
The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.
Here's an example of how you might refactor the switch statement:
```diff
+const vendorManifestMap: { [key: string]: any } = {
+ "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+ // Include all other vendor paths and their corresponding manifests
+};
export const getVendorInfoController: RequestHandler = (req, res) => {
- switch (req.query.vendor as string) {
- case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
- res.json(OstronFishmongerVendorManifest);
- break;
- case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
- res.json(OstronProspectorVendorManifest);
- break;
- // ... other cases ...
- default:
- throw new Error(`Unknown vendor: ${req.query.vendor}`);
- }
+ const vendorPath = req.query.vendor as string;
+ const manifest = vendorManifestMap[vendorPath];
+ if (manifest) {
+ res.json(manifest);
+ } else {
+ throw new Error(`Unknown vendor: ${vendorPath}`);
+ }
};
```
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
> Committable suggestion was skipped due to low confidence.
<!-- This is an auto-generated comment by CodeRabbit -->
![]() ⚠️ Potential issue Correct the import paths for Ostron manifests The imports for Apply this diff to correct the import paths:
📝 Committable suggestion
_:warning: Potential issue_
**Correct the import paths for Ostron manifests**
The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.
Apply this diff to correct the import paths:
```diff
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
```
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
![]() 🛠️ Refactor suggestion Consider refactoring the switch statement for better maintainability The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement:
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
_:hammer_and_wrench: Refactor suggestion_
**Consider refactoring the switch statement for better maintainability**
The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.
Here's an example of how you might refactor the switch statement:
```diff
+const vendorManifestMap: { [key: string]: any } = {
+ "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+ "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+ // Include all other vendor paths and their corresponding manifests
+};
export const getVendorInfoController: RequestHandler = (req, res) => {
- switch (req.query.vendor as string) {
- case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
- res.json(OstronFishmongerVendorManifest);
- break;
- case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
- res.json(OstronProspectorVendorManifest);
- break;
- // ... other cases ...
- default:
- throw new Error(`Unknown vendor: ${req.query.vendor}`);
- }
+ const vendorPath = req.query.vendor as string;
+ const manifest = vendorManifestMap[vendorPath];
+ if (manifest) {
+ res.json(manifest);
+ } else {
+ throw new Error(`Unknown vendor: ${vendorPath}`);
+ }
};
```
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
> Committable suggestion was skipped due to low confidence.
<!-- This is an auto-generated comment by CodeRabbit -->
|
@ -0,0 +1,125 @@
|
|||||||
|
{
|
||||||
|
"VendorInfo": {
|
||||||
|
"_id": {
|
||||||
|
"$oid": "5dbb4c41e966f7886c3ce939"
|
||||||
|
},
|
||||||
|
"TypeName": "/Lotus/Types/Game/VendorManifests/Hubs/IronwakeDondaVendorManifest",
|
||||||
|
"ItemManifest": [
|
||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/HarrowQuestKeyOrnament",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemCount": 25,
|
||||||
|
"ItemType": "/Lotus/Types/Items/MiscItems/PrimeBucks",
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_0",
|
||||||
|
"QuantityMultiplier": 1,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowMultipurchase": true,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "66fd60b20ba592c4c95e945f"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Types/BoosterPacks/RivenModPack",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemCount": 10,
|
||||||
|
"ItemType": "/Lotus/Types/Items/MiscItems/RivenFragment",
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_0",
|
||||||
|
"QuantityMultiplier": 1,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PurchaseQuantityLimit": 1,
|
||||||
|
"AllowMultipurchase": false,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "66fd60b20ba592c4c95e9468"
|
||||||
|
}
|
||||||
|
},
|
||||||
![]() ⚠️ Potential issue Remove duplicate RivenModPack entry. There are two identical entries for the RivenModPack item in the ItemManifest. This appears to be a duplication error. Please remove one of these entries to avoid confusion and potential issues with the vendor's inventory. To fix this, remove one of the RivenModPack entries (lines 29-50 or lines 96-116). Also applies to: 96-116 _:warning: Potential issue_
**Remove duplicate RivenModPack entry.**
There are two identical entries for the RivenModPack item in the ItemManifest. This appears to be a duplication error. Please remove one of these entries to avoid confusion and potential issues with the vendor's inventory.
To fix this, remove one of the RivenModPack entries (lines 29-50 or lines 96-116).
Also applies to: 96-116
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Types/StoreItems/CreditBundles/150000Credits",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemCount": 5,
|
||||||
|
"ItemType": "/Lotus/Types/Items/MiscItems/RivenFragment",
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_0",
|
||||||
|
"QuantityMultiplier": 1,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PurchaseQuantityLimit": 1,
|
||||||
|
"AllowMultipurchase": false,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "66fd60b20ba592c4c95e9469"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/Kuva",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemCount": 10,
|
||||||
|
"ItemType": "/Lotus/Types/Items/MiscItems/RivenFragment",
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_0",
|
||||||
|
"QuantityMultiplier": 35000,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PurchaseQuantityLimit": 1,
|
||||||
|
"AllowMultipurchase": false,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "66fd60b20ba592c4c95e946a"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Types/BoosterPacks/RivenModPack",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemCount": 10,
|
||||||
|
"ItemType": "/Lotus/Types/Items/MiscItems/RivenFragment",
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_0",
|
||||||
|
"QuantityMultiplier": 1,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PurchaseQuantityLimit": 1,
|
||||||
|
"AllowMultipurchase": false,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "66fd60b20ba592c4c95e946b"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"PropertyTextHash": "62B64A8065B7C0FA345895D4BC234621",
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
⚠️ Potential issue
Correct the import paths for Ostron manifests
The imports for
OstronProspectorVendorManifest
andOstronPetVendorManifest
are both importing from theOstronFishmongerVendorManifest.json
file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.Apply this diff to correct the import paths:
📝 Committable suggestion
🛠️ Refactor suggestion
Consider refactoring the switch statement for better maintainability
The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.
Here's an example of how you might refactor the switch statement:
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.
⚠️ Potential issue
Correct the import paths for Ostron manifests
The imports for
OstronProspectorVendorManifest
andOstronPetVendorManifest
are both importing from theOstronFishmongerVendorManifest.json
file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.Apply this diff to correct the import paths:
📝 Committable suggestion
🛠️ Refactor suggestion
Consider refactoring the switch statement for better maintainability
The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.
Here's an example of how you might refactor the switch statement:
This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.