ADORSYS-GIS / ADORSYS-GIS/webank-UserApp
Ensure Frontend Handles Standardized Backend Responses
- Lenguaje dominante
- TypeScript
- Estrellas
- 5
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
### Description:
The frontend currently lacks consistency in handling API responses, leading to incorrect or missing user feedback. We need to update all frontend logic to align with the backend's standardized response structure (such as `EmailValidationResponse` and `EmailResponse`).
#### Goals:
* Update frontend API handling to properly read and use:
* `status`
* `message`
* `data` (if present)
* Display backend-provided messages to users using `response.message`
* Make decisions based on the actual `status` value (`SUCCESS`, `FAILED`, etc.)
* Remove hardcoded or outdated logic related to API responses
#### Example:
```js
// Instead of:
if (res.ok) { show("Success") }
// Use:
if (res.status === "SUCCESS") {
show(res.message)
}
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.