rename rule set to rule
This commit is contained in:
+3
-3
@@ -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);
|
||||
Reference in New Issue
Block a user