| | |
| | | console.error('Error setting timeout alert:', error); |
| | | throw error; |
| | | } |
| | | }; |
| | | |
| | | export const sendValidateCode = async (requestData): Promise<ApiResponse> => { |
| | | try { |
| | | const response = await axios.post(`${apiBaseUrl}/user/info/sendValidateCodeForRegister`, requestData, { |
| | | headers: { |
| | | 'Content-Type': 'application/x-www-form-urlencoded' |
| | | } |
| | | }); |
| | | return response.data; |
| | | } catch (error) { |
| | | console.error('Error setting timeout alert:', error); |
| | | throw error; |
| | | } |
| | | }; |
| | | |
| | | export const registerForNutrition = async (requestData): Promise<ApiResponse> => { |
| | | try { |
| | | const response = await axios.post(`${apiBaseUrl}/user/info/registerForNutrition`, requestData, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }); |
| | | return response.data; |
| | | } catch (error) { |
| | | console.error('Error setting timeout alert:', error); |
| | | throw error; |
| | | } |
| | | }; |