Parcourir la source

Ajout controle num page inf 1

Arthur Brandao il y a 5 ans
Parent
commit
836f27ee9e
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      src/microfolie/entry/rest/UsagerController.java

+ 3 - 0
src/microfolie/entry/rest/UsagerController.java

@@ -42,6 +42,9 @@ public class UsagerController {
 		JSONObject data = new JSONObject();
 		// Récupération info
 		long total = service.getTotalNumber();
+		if (num < 1) {
+			num = 1;
+		}
 		while (total <= perPage * (num - 1)) {
 			num--;
 		}