Statystyki
							parent
							
								
									0a7d6e9911
								
							
						
					
					
						commit
						89bcf50870
					
				| 
						 | 
				
			
			@ -105,5 +105,18 @@ apiLiczacy.get("/wyloguj", function(req, res) {
 | 
			
		|||
    });
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
apiLiczacy.get("/top10Liczacy", function(req, res) {
 | 
			
		||||
    con.query("SELECT idLiczacego, imie, nazwisko, sumaPrzeliczona FROM `sumaPrzeliczona` ORDER BY `sumaPrzeliczona`.`sumaPrzeliczona` DESC LIMIT 10;", function(err, result) {
 | 
			
		||||
        if (err) throw err;
 | 
			
		||||
        res.send(result);
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
apiLiczacy.get("/top10Wolontariuszy", function(req, res) {
 | 
			
		||||
    con.query('SELECT numerIdentyfikatora, imie, nazwisko, suma FROM `SumaZebranaPrzezWolontariuszy` ORDER BY `SumaZebranaPrzezWolontariuszy`.`suma` DESC LIMIT 10;', function(err, result) {
 | 
			
		||||
        if (err) throw err;
 | 
			
		||||
        res.send(result);
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
module.exports = apiLiczacy;
 | 
			
		||||
| 
						 | 
				
			
			@ -94,4 +94,18 @@ apiPanel.post("/potwierdzRozliczenie/:id", function(req, res) {
 | 
			
		|||
    });
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
apiPanel.get("/top10Liczacy", function(req, res) {
 | 
			
		||||
    con.query("SELECT idLiczacego, imie, nazwisko, sumaPrzeliczona FROM `sumaPrzeliczona` ORDER BY `sumaPrzeliczona`.`sumaPrzeliczona` DESC LIMIT 10;", function(err, result) {
 | 
			
		||||
        if (err) throw err;
 | 
			
		||||
        res.send(result);
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
apiPanel.get("/top10Wolontariuszy", function(req, res) {
 | 
			
		||||
    con.query('SELECT numerIdentyfikatora, imie, nazwisko, suma FROM `SumaZebranaPrzezWolontariuszy` ORDER BY `SumaZebranaPrzezWolontariuszy`.`suma` DESC LIMIT 10;', function(err, result) {
 | 
			
		||||
        if (err) throw err;
 | 
			
		||||
        res.send(result);
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
module.exports = apiPanel;
 | 
			
		||||
		Loading…
	
		Reference in New Issue