rename rule set to rule

This commit is contained in:
Sirttas
2026-05-28 13:15:15 +02:00
parent b40b58f866
commit 676ff961ed
5 changed files with 13 additions and 13 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import {ruleBookControllerApi} from "@/mammon";
import {RuleBookResponse, RuleClauseResponseRateEnum, RuleSetResponse} from "@/generated/mammon";
import {RuleBookResponse, RuleClauseResponseRateEnum, RuleResponse} from "@/generated/mammon";
export const activityTypes = {
itemBought: {key: "ITEM_BOUGHT", name: "Item Bought"},
@@ -10,7 +10,7 @@ export const activityTypes = {
export type Activity = { key: ActivityType, name: string }
export type ActivityType = typeof activityTypes[keyof typeof activityTypes]['key'];
export type RuleBook = RuleBookResponse & { ruleSets: { [key: ActivityType]: RuleSetResponse; } }
export type RuleBook = RuleBookResponse & { rules: { [key: ActivityType]: RuleResponse; } }
export const ratesTypes = {
None: {key: "NONE", name: "0 ISK"},
@@ -24,7 +24,7 @@ export type Rate = { key: RuleClauseResponseRateEnum, name: string }
export const findByCharacterId = (characterId: number): Promise<RuleBook> => ruleBookControllerApi.findByCharacterId(characterId)
.then(response => response.data)
.catch(() => ({characterId, ruleSets: {}}));
.catch(() => ({characterId, rules: {}}));
export const setCharacterRuleBook = (characterId: number, ruleBook: RuleBook): Promise<RuleBook> => ruleBookControllerApi.setCharacterRuleBook(characterId, ruleBook)
.then(response => response.data);