Exemplo n.º 1
0
  public static Result listBackupsFor_JSON(String username, Long jobId) {
    Logger.info("Listing backups for job " + jobId);
    Job job = Job.findById(jobId);
    if (job == null) return notFound();

    List<Backup> backups = Backup.findByJob(job);
    return ok(Json.toJson(BackupFilter.map(backups)));
  }
Exemplo n.º 2
0
  public static Result deleteJob(String username, Long jobId) {
    Job job = Job.findById(jobId);
    if (job != null) Job.deleteCascaded(job);

    return noContent();
  }