Closed FearsomeRover closed 2 months ago
Yea, we need to think about what the correct order of business here is. I think first we need to update the profile data, and if it is successful onl then post the application. Also do we need to have some sort of confirmation when the users room hasn't changed? Or do they only need to check the rules checkbox then? On 31 Aug 2024, 20:47 +0200, Mozsár Máté @.***>, wrote:
@mozsarmate commented on this pull request. In apps/frontend/src/components/ui/ApplicationForm.tsx:
try {
- const response = await axios.post('/api/application', values);
- if (response.status === 200) {
- const updateResponse = await api.patch('/users/me', values);
- const response = await api.post('/application', { the user is able to send their application even if they fail to update their data? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Yeah, i agree on this, although your code does not check whether the profile data update was successful or not. I don't think we would need another checkbox, would say that the opportunity to change your room number is quite clear.
Yeah, i agree on this, although your code does not check whether the profile data update was successful or not. I don't think we would need another checkbox, would say that the opportunity to change your room number is quite clear.
Well axios throws error, if the response status is 4-500 so the application wont be submitted.
The latest updates on your projects. Learn more about Vercel for Git ↗︎