Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 129x 14x 14x 11x | import axios from 'axios' import { LastWillState } from '../../../types/lastWill' type UpdateLastWillByIdResponse = LastWillState['data'] | 'ERROR' export const updateLastWillById = async ( id: string, lastWill: LastWillState['data'] ): Promise<UpdateLastWillByIdResponse> => { try { const response = await axios.put<LastWillState['data']>(`${process.env.NEXT_PUBLIC_API_BASE_URL}/lastwill/${id}`, { ...lastWill, common: {}, }) return response.data } catch (error) { return 'ERROR' } } |