|
|
@@ -1,5 +1,3 @@
|
|
|
-// noinspection JSCheckFunctionSignatures
|
|
|
-
|
|
|
export const characterQueryKeys = {
|
|
|
root: ["characters"],
|
|
|
options: () => [...characterQueryKeys.root, "options"],
|
|
|
@@ -8,7 +6,8 @@ export const characterQueryKeys = {
|
|
|
|
|
|
export const characterListQuery = defineQueryOptions({
|
|
|
key: characterQueryKeys.root,
|
|
|
- query: () => useEmit("character:list")
|
|
|
+ query: () => useEmit("character:list"),
|
|
|
+ normalize: true
|
|
|
})
|
|
|
|
|
|
export const characterOptionsQuery = defineQueryOptions({
|
|
|
@@ -18,5 +17,7 @@ export const characterOptionsQuery = defineQueryOptions({
|
|
|
|
|
|
export const characterByIdQuery = defineQueryOptions((id) => ({
|
|
|
key: characterQueryKeys.byId(id),
|
|
|
- query: () => useEmit("character:read", id)
|
|
|
+ query: () => useEmit("character:read", id),
|
|
|
+ normalize: true,
|
|
|
+ redirect: { entityType: "character" }
|
|
|
}))
|