feat: implement syndicateStandingBonus endpoint #583
61
src/controllers/api/syndicateStandingBonusController.ts
Normal file
@ -0,0 +1,61 @@
|
||||
|
||||
import { RequestHandler } from "express";
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
import { IOid } from "@/src/types/commonTypes";
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
import { ExportSyndicates } from "warframe-public-export-plus";
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
export const syndicateStandingBonusController: RequestHandler = async (req, res) => {
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
const request = JSON.parse(String(req.body)) as ISyndicateStandingBonusRequest;
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
![]() ⚠️ Potential issue Add request body validation and error handling The current implementation directly parses the request body without proper validation or error handling. Consider adding validation and error handling:
_:warning: Potential issue_
**Add request body validation and error handling**
The current implementation directly parses the request body without proper validation or error handling.
Consider adding validation and error handling:
```diff
- const request = JSON.parse(String(req.body)) as ISyndicateStandingBonusRequest;
+ try {
+ const request = JSON.parse(String(req.body)) as ISyndicateStandingBonusRequest;
+ if (!request.Operation?.AffiliationTag || !Array.isArray(request.Operation.Items)) {
+ return res.status(400).json({ error: 'Invalid request format' });
+ }
+ } catch (error) {
+ return res.status(400).json({ error: 'Invalid JSON payload' });
+ }
```
> Committable suggestion skipped: line range outside the PR's diff.
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
let gainedStanding = 0;
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
request.Operation.Items.forEach(item => {
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
const medallion = (ExportSyndicates[request.Operation.AffiliationTag].medallions ?? []).find(
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
medallion => medallion.itemType == item.ItemType
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
);
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
if (medallion) {
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
gainedStanding += medallion.standing * item.ItemCount;
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
}
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
item.ItemCount *= -1;
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
});
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
![]() ⚠️ Potential issue Improve standing calculation logic and add safety checks The standing calculation lacks validation for item existence and potential overflow issues. Consider adding these safety measures:
📝 Committable suggestion
_:warning: Potential issue_
**Improve standing calculation logic and add safety checks**
The standing calculation lacks validation for item existence and potential overflow issues.
Consider adding these safety measures:
```diff
let gainedStanding = 0;
+ const maxStanding = Number.MAX_SAFE_INTEGER; // Define appropriate limit
request.Operation.Items.forEach(item => {
+ if (!item.ItemType || typeof item.ItemCount !== 'number') {
+ throw new Error('Invalid item format');
+ }
const medallion = (ExportSyndicates[request.Operation.AffiliationTag].medallions ?? []).find(
medallion => medallion.itemType == item.ItemType
);
if (medallion) {
- gainedStanding += medallion.standing * item.ItemCount;
+ const standingChange = medallion.standing * item.ItemCount;
+ if (Math.abs(gainedStanding + standingChange) > maxStanding) {
+ throw new Error('Standing calculation overflow');
+ }
+ gainedStanding += standingChange;
}
item.ItemCount *= -1;
});
```
<!-- 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
let gainedStanding = 0;
const maxStanding = Number.MAX_SAFE_INTEGER; // Define appropriate limit
request.Operation.Items.forEach(item => {
if (!item.ItemType || typeof item.ItemCount !== 'number') {
throw new Error('Invalid item format');
}
const medallion = (ExportSyndicates[request.Operation.AffiliationTag].medallions ?? []).find(
medallion => medallion.itemType == item.ItemType
);
if (medallion) {
const standingChange = medallion.standing * item.ItemCount;
if (Math.abs(gainedStanding + standingChange) > maxStanding) {
throw new Error('Standing calculation overflow');
}
gainedStanding += standingChange;
}
item.ItemCount *= -1;
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated reply by CodeRabbit -->
Sainan
commented
Bro what are you on? Can I have some? Bro what are you on? Can I have some?
![]() @Sainan Haha, I’m just a humble AI, powered only by code and curiosity—nothing more tantalizing than that! Let me know if there’s something else I can help you with. @Sainan Haha, I’m just a humble AI, powered only by code and curiosity—nothing more tantalizing than that! Let me know if there’s something else I can help you with.
<!-- This is an auto-generated reply by CodeRabbit -->
|
||||
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
const inventory = await getInventory(accountId);
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
addMiscItems(inventory, request.Operation.Items);
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
const syndicate = inventory.Affiliations.find(x => x.Tag == request.Operation.AffiliationTag);
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
if (syndicate !== undefined) {
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
syndicate.Standing += gainedStanding;
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
} else {
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
inventory.Affiliations.push({
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
Tag: request.Operation.AffiliationTag,
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
Standing: gainedStanding
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
});
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
}
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
// TODO: Subtract from daily limit bin; maybe also a cheat to skip that.
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
await inventory.save();
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
![]() ⚠️ Potential issue Add error handling for save operation and implement daily limits
Consider this safer approach:
📝 Committable suggestion
_:warning: Potential issue_
**Add error handling for save operation and implement daily limits**
1. The save operation should include error handling.
2. The TODO comment indicates missing daily limit functionality.
Consider this safer approach:
```diff
- // TODO: Subtract from daily limit bin; maybe also a cheat to skip that.
- await inventory.save();
+ try {
+ // TODO: Implement daily limit check
+ await inventory.save();
+ } catch (error) {
+ console.error('Failed to save inventory:', error);
+ return res.status(500).json({ error: 'Failed to save inventory' });
+ }
```
<!-- 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
try {
// TODO: Implement daily limit check
await inventory.save();
} catch (error) {
console.error('Failed to save inventory:', error);
return res.status(500).json({ error: 'Failed to save inventory' });
}
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
res.json({
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
InventoryChanges: {
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
MiscItems: request.Operation.Items
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
},
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
AffiliationMods: [
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
{
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
Tag: request.Operation.AffiliationTag,
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
Standing: gainedStanding
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
}
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
]
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
});
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
};
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
interface ISyndicateStandingBonusRequest {
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
Operation: {
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
AffiliationTag: string;
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
AlternateBonusReward: ""; // ???
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
Items: IMiscItem[];
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
};
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
ModularWeaponId: IOid; // Seems to just be "000000000000000000000000", also note there's a "Category" query field
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
}
|
||||
![]() ⚠️ Potential issue Fix hardcoded syndicate tag in response The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request. Apply this fix:
📝 Committable suggestion
_:warning: Potential issue_
**Fix hardcoded syndicate tag in response**
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
```diff
AffiliationMods: [
{
- Tag: "HexSyndicate",
+ Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
```
<!-- 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
res.json({
InventoryChanges: {
MiscItems: request.Operation.Items
},
AffiliationMods: [
{
Tag: request.Operation.AffiliationTag,
Standing: gainedStanding
}
]
});
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
![]() 🛠️ Refactor suggestion Improve interface documentation and type safety The interface has some unclear fields that need better documentation:
Consider this improvement:
📝 Committable suggestion
_:hammer_and_wrench: Refactor suggestion_
**Improve interface documentation and type safety**
The interface has some unclear fields that need better documentation:
1. `AlternateBonusReward` is marked with "???" and typed as empty string
2. `ModularWeaponId` comment suggests it might always be zeros
Consider this improvement:
```diff
interface ISyndicateStandingBonusRequest {
Operation: {
AffiliationTag: string;
- AlternateBonusReward: ""; // ???
+ AlternateBonusReward: string; // TODO: Document the purpose and possible values
Items: IMiscItem[];
};
- ModularWeaponId: IOid; // Seems to just be "000000000000000000000000", also note there's a "Category" query field
+ ModularWeaponId: IOid; // TODO: Verify if this field is actually needed
}
```
<!-- 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
interface ISyndicateStandingBonusRequest {
Operation: {
AffiliationTag: string;
AlternateBonusReward: string; // TODO: Document the purpose and possible values
Items: IMiscItem[];
};
ModularWeaponId: IOid; // TODO: Verify if this field is actually needed
}
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
@ -61,6 +61,7 @@ import { startRecipeController } from "@/src/controllers/api/startRecipeControll
|
||||
import { stepSequencersController } from "@/src/controllers/api/stepSequencersController";
|
||||
import { surveysController } from "@/src/controllers/api/surveysController";
|
||||
import { syndicateSacrificeController } from "../controllers/api/syndicateSacrificeController";
|
||||
import { syndicateStandingBonusController } from "../controllers/api/syndicateStandingBonusController";
|
||||
import { tauntHistoryController } from "@/src/controllers/api/tauntHistoryController";
|
||||
import { trainingResultController } from "@/src/controllers/api/trainingResultController";
|
||||
import { updateChallengeProgressController } from "@/src/controllers/api/updateChallengeProgressController";
|
||||
@ -137,6 +138,7 @@ apiRouter.post("/startDojoRecipe.php", startDojoRecipeController);
|
||||
apiRouter.post("/startRecipe.php", startRecipeController);
|
||||
apiRouter.post("/stepSequencers.php", stepSequencersController);
|
||||
apiRouter.post("/syndicateSacrifice.php", syndicateSacrificeController);
|
||||
apiRouter.post("/syndicateStandingBonus.php", syndicateStandingBonusController);
|
||||
apiRouter.post("/tauntHistory.php", tauntHistoryController);
|
||||
apiRouter.post("/trainingResult.php", trainingResultController);
|
||||
apiRouter.post("/updateChallengeProgress.php", updateChallengeProgressController);
|
||||
|
⚠️ Potential issue
Fix hardcoded syndicate tag in response
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
📝 Committable suggestion
⚠️ Potential issue
Fix hardcoded syndicate tag in response
The response uses a hardcoded "HexSyndicate" tag instead of the actual AffiliationTag from the request.
Apply this fix:
📝 Committable suggestion