import axios from 'axios' ; import { Category , KungFu } from '../model/base' ; import { Enhance , SimpleEnhance } from '../model/enhance' ; import { Resource } from '../model/resource' ; import { ENDPOINT , errorHandler } from './base' ; export class EnhanceService { static async listEnhance ( category , kungfu ) { const res = await axios . get ( `${ ENDPOINT }/enhance` , { params : { category , kungfu , } , } ) . catch ( errorHandler ) ; return res ?. data . data ?? [ ] ; } static async getEnhance ( id ) { const res = await axios . get ( `${ ENDPOINT }/enhance/${ id }` ) . catch ( errorHandler ) ; return res ?. data . data ?? { } ; } }