Explorar o código

Ajout controle num page inf 1

Arthur Brandao %!s(int64=5) %!d(string=hai) anos
pai
achega
836f27ee9e
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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--;
 		}