fix: missing vendor infos #565
@ -53,7 +53,7 @@ export const getVendorInfoController: RequestHandler = (req, res) => {
|
||||
|
||||
case "/Lotus/Types/Game/VendorManifests/Solaris/DebtTokenVendorManifest":
|
||||
res.json(SolarisDebtTokenVendorManifest);
|
||||
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/Solaris/DebtTokenVendorRepossessionsManifest":
|
||||
res.json(SolarisDebtTokenVendorRepossessionsManifest);
|
||||
break;
|
||||
![]() ⚠️ Potential issue Missing Vendor Manifest for 'Ticker' According to issue #560, the vendor 'Ticker' does not have a vendor manifest included in the controller. It appears that 'Ticker' is still missing from the Would you like assistance in adding the 'Ticker' vendor manifest to the controller? _:warning: Potential issue_
**Missing Vendor Manifest for 'Ticker'**
According to issue #560, the vendor 'Ticker' does not have a vendor manifest included in the controller. It appears that 'Ticker' is still missing from the `getVendorInfoController`. To fully resolve the linked issue, please include the 'Ticker' vendor manifest.
Would you like assistance in adding the 'Ticker' vendor manifest to the controller?
<!-- 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 -->
![]() ⚠️ 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
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.