13 lines
315 B
TypeScript
13 lines
315 B
TypeScript
import { cache } from 'react';
|
|
import { publicServerRequest } from '@/lib/server/request';
|
|
|
|
export const fetchCharacterDetail = cache(async (id: string) => {
|
|
const res = await publicServerRequest(`/character/detail`, {
|
|
method: 'post',
|
|
params: {
|
|
roleId: id,
|
|
},
|
|
});
|
|
return res.data ?? {};
|
|
});
|