Fix the "error" bug
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Build and test backend / Build-backend (push) Successful in 2m34s
				
			
		
			
				
	
				deploy to production / deploy-frontend (push) Successful in 27s
				
			
		
			
				
	
				deploy to production / deploy-backend (push) Successful in 2m21s
				
			
		
			
				
	
				Build and test FrontEnd / Build-frontend (push) Successful in 24s
				
			
		
			
				
	
				Build and test backend / Test-backend (push) Successful in 1m21s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Build and test backend / Build-backend (push) Successful in 2m34s
				
			deploy to production / deploy-frontend (push) Successful in 27s
				
			deploy to production / deploy-backend (push) Successful in 2m21s
				
			Build and test FrontEnd / Build-frontend (push) Successful in 24s
				
			Build and test backend / Test-backend (push) Successful in 1m21s
				
			Even when the requests was sucessfull, the "error" toast was appearing... now it should do a "success" when adequate
This commit is contained in:
		| @ -41,7 +41,8 @@ async function _rest(endPoint, config){ | ||||
| 			pending: config['pending'] != null ? config['pending'] : 'pending', | ||||
| 			error: config['error'] != null ? config['error'] : 'Network Failure...', | ||||
| 			success: config['success'] != null ? config['success'] : {render(res){ | ||||
| 				return res.ok ? "Success" : "error"; | ||||
| 				console.log(res); | ||||
| 				return res.data.ok ? "Success" : "error"; | ||||
| 			}}, | ||||
| 		}) | ||||
| 		.then( e => e.json()).catch( e => e ); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user