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 21 | 11x 1x 1x 1x 1x | import axios from 'axios'
import { ApiCreateLastWillResponse } from '../../../types/api'
export const createLastWill = async () => {
try {
const response = await axios.post<ApiCreateLastWillResponse>(`${process.env.NEXT_PUBLIC_API_BASE_URL}/lastwill`, {
testator: {
name: '',
},
common: {},
progressKeys: [],
})
return response.data
} catch (error) {
console.error(error)
// TODO: Add better error handling here
return null
}
}
|