[DEV] update back API

This commit is contained in:
Edouard DUPIN 2022-04-01 20:26:38 +02:00
parent 89cd0263c4
commit 1b9726b7e7
4 changed files with 23 additions and 28 deletions

View File

@ -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

View File

@ -1,5 +0,0 @@
package org.kar.karideo.model;
public enum AgeLimit {
}

View File

@ -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<Long> 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("-");

View File

@ -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<Long> 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 +
'}';
}