Update CBS Mobile App codebase
This commit is contained in:
@@ -3,6 +3,12 @@ import axios from 'axios';
|
||||
import { env } from '../../config/env';
|
||||
import { attachInterceptors } from './interceptors';
|
||||
|
||||
/**
|
||||
* Single client for the CBS backend. The response interceptor unwraps the
|
||||
* `{ success, message, data }` envelope, so callers read `response.data` as the
|
||||
* endpoint payload and a `success: false` body arrives as a thrown
|
||||
* `CbsApiError` carrying the code to switch on.
|
||||
*/
|
||||
export const apiClient = axios.create({
|
||||
baseURL: env.apiBaseUrl,
|
||||
timeout: 15000,
|
||||
|
||||
Reference in New Issue
Block a user