fix: fixed TS errors
This commit is contained in:
@ -34,11 +34,11 @@ axiosInstance.interceptors.response.use(
|
||||
);
|
||||
|
||||
// TODO: spawn a error modal
|
||||
function defaultApiErrorHandler(err: String){
|
||||
function defaultApiErrorHandler(err: string){
|
||||
addNewMessage(err, color.Red);
|
||||
}
|
||||
|
||||
function defaultApiSuccessHandler(response: () => void){
|
||||
function defaultApiSuccessHandler(response: any){
|
||||
addNewMessage(response.data, color.green)
|
||||
}
|
||||
function callApi(endpoint: string, onSuccessHandler?: any, onErrorHandler?: any): void {
|
||||
|
Reference in New Issue
Block a user