Преглед на файлове

Ajout controle num page inf 1

Arthur Brandao преди 5 години
родител
ревизия
836f27ee9e
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  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--;
 		}