From 1b9726b7e77b734aa4d21205058cbc710449f13f Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Fri, 1 Apr 2022 20:26:38 +0200 Subject: [PATCH] [DEV] update back API --- .../org/kar/karideo/api/SeriesResource.java | 4 +-- back/src/org/kar/karideo/model/AgeLimit.java | 5 --- .../src/org/kar/karideo/model/MediaSmall.java | 34 +++++++++---------- back/src/org/kar/karideo/model/NodeSmall.java | 8 ++--- 4 files changed, 23 insertions(+), 28 deletions(-) delete mode 100644 back/src/org/kar/karideo/model/AgeLimit.java diff --git a/back/src/org/kar/karideo/api/SeriesResource.java b/back/src/org/kar/karideo/api/SeriesResource.java index ccf6a10..748a1d7 100644 --- a/back/src/org/kar/karideo/api/SeriesResource.java +++ b/back/src/org/kar/karideo/api/SeriesResource.java @@ -54,11 +54,11 @@ public class SeriesResource { @Path("{id}/add_cover") @Consumes({MediaType.MULTIPART_FORM_DATA}) public Response uploadCover(@PathParam("id") Long id, - @FormDataParam("file_name") String file_name, + @FormDataParam("file_name") String fileName, @FormDataParam("file") InputStream fileInputStream, @FormDataParam("file") FormDataContentDisposition fileMetaData ) { - return NodeInterface.uploadCover(typeInNode, id, file_name, fileInputStream, fileMetaData); + return NodeInterface.uploadCover(typeInNode, id, fileName, fileInputStream, fileMetaData); } @GET diff --git a/back/src/org/kar/karideo/model/AgeLimit.java b/back/src/org/kar/karideo/model/AgeLimit.java deleted file mode 100644 index 55f96b1..0000000 --- a/back/src/org/kar/karideo/model/AgeLimit.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.kar.karideo.model; - -public enum AgeLimit { - -} diff --git a/back/src/org/kar/karideo/model/MediaSmall.java b/back/src/org/kar/karideo/model/MediaSmall.java index a7c37b5..0ce16e8 100644 --- a/back/src/org/kar/karideo/model/MediaSmall.java +++ b/back/src/org/kar/karideo/model/MediaSmall.java @@ -21,15 +21,15 @@ public class MediaSmall { public Long id; public String name; public String description; - public Long data_id; - public Long type_id; - public Long universe_id; - public Long series_id; - public Long season_id; + public Long dataId; + public Long typeId; + public Long universeId; + public Long seriesId; + public Long seasonId; public Integer episode; public Integer date; public Integer time; - public String age_limit; + public String ageLimit; public List covers = new ArrayList<>(); public MediaSmall(ResultSet rs) { @@ -38,25 +38,25 @@ public class MediaSmall { this.id = rs.getLong(iii++); this.name = rs.getString(iii++); this.description = rs.getString(iii++); - this.data_id = rs.getLong(iii++); + this.dataId = rs.getLong(iii++); if (rs.wasNull()) { - this.data_id = null; + this.dataId = null; } - this.type_id = rs.getLong(iii++); + this.typeId = rs.getLong(iii++); if (rs.wasNull()) { - this.type_id = null; + this.typeId = null; } - this.universe_id = rs.getLong(iii++); + this.universeId = rs.getLong(iii++); if (rs.wasNull()) { - this.universe_id = null; + this.universeId = null; } - this.series_id = rs.getLong(iii++); + this.seriesId = rs.getLong(iii++); if (rs.wasNull()) { - this.series_id = null; + this.seriesId = null; } - this.season_id = rs.getLong(iii++); + this.seasonId = rs.getLong(iii++); if (rs.wasNull()) { - this.season_id = null; + this.seasonId = null; } this.episode = rs.getInt(iii++); if (rs.wasNull()) { @@ -70,7 +70,7 @@ public class MediaSmall { if (rs.wasNull()) { this.time = null; } - this.age_limit = rs.getString(iii++); + this.ageLimit = rs.getString(iii++); String coversString = rs.getString(iii++); if (!rs.wasNull()) { String[] elements = coversString.split("-"); diff --git a/back/src/org/kar/karideo/model/NodeSmall.java b/back/src/org/kar/karideo/model/NodeSmall.java index 8ffe491..0b59ef3 100644 --- a/back/src/org/kar/karideo/model/NodeSmall.java +++ b/back/src/org/kar/karideo/model/NodeSmall.java @@ -21,7 +21,7 @@ public class NodeSmall { public Long id; public String name; public String description; - public Long parent_id; + public Long parentId; public List covers = new ArrayList<>(); public NodeSmall(ResultSet rs) { @@ -30,9 +30,9 @@ public class NodeSmall { this.id = rs.getLong(iii++); this.name = rs.getString(iii++); this.description = rs.getString(iii++); - this.parent_id = rs.getLong(iii++); + this.parentId = rs.getLong(iii++); if (rs.wasNull()) { - this.parent_id = null; + this.parentId = null; } String coversString = rs.getString(iii++); if (!rs.wasNull()) { @@ -53,7 +53,7 @@ public class NodeSmall { "id=" + id + ", name='" + name + '\'' + ", description='" + description + '\'' + - ", parent_id=" + parent_id + + ", parentId=" + parentId + ", covers=" + covers + '}'; }