Пример #1
0
 public static void check(String result, Long id) {
   Verify verify = Verify.find("byId", id).first();
   if (result.equals("admit")) {
     Upload upload = new Upload(verify.author, verify.title, verify.content, verify.photoUrl);
     upload.save();
     verify.delete();
   } else {
     verify.delete();
   }
   index();
 }
Пример #2
0
 public static void index() {
   List<Verify> verifies = Verify.findAll();
   if (verifies.size() > 0) {
     render(verifies);
   } else {
     String message = "There is no upload need to be verified.";
     render(verifies, message);
   }
 }
Пример #3
0
 public static void show(Long id) {
   Verify verify = Verify.find("byId", id).first();
   render(verify);
 }