All files / services/api/lastwill updateLastWillById.ts

80% Statements 4/5
100% Branches 0/0
100% Functions 1/1
80% Lines 4/5

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      122x 13x 13x       10x          
import axios from 'axios'
import { LastWillState } from '../../../types/lastWill'
 
export const updateLastWillById = async (id: string, lastWill: LastWillState['data']) => {
	try {
		const response = await axios.put<LastWillState['data']>(`${process.env.NEXT_PUBLIC_API_BASE_URL}/lastwill/${id}`, {
			...lastWill,
			common: {},
		})
		return response.data
	} catch (error) {
		console.error(error)
	}
}