getTradingDeals /tradings
This commit is contained in:
		@@ -129,6 +129,20 @@ public class Response {
 | 
			
		||||
            } else {
 | 
			
		||||
                sendError("500");
 | 
			
		||||
            }
 | 
			
		||||
        }else if(this.url.startsWith("/tradings")) {
 | 
			
		||||
            ArrayList<TradingDeal> allDeals = new DBConnection().getAllTradingDeals();
 | 
			
		||||
            if(allDeals != null && !allDeals.isEmpty()){
 | 
			
		||||
                String json = JsonHelper.objToJson(allDeals);
 | 
			
		||||
                if(json != null && json != ""){
 | 
			
		||||
                    sendResponse(json, "200");
 | 
			
		||||
                }else{
 | 
			
		||||
                    sendError("500");
 | 
			
		||||
                }
 | 
			
		||||
            }else{
 | 
			
		||||
                sendError("500");
 | 
			
		||||
            }
 | 
			
		||||
        }else{
 | 
			
		||||
            sendError("204");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user