[DEV] update to the new model system
This commit is contained in:
parent
511c6d0bc7
commit
516a0bbfa0
@ -6,8 +6,8 @@
|
|||||||
<properties>
|
<properties>
|
||||||
|
|
||||||
<maven.compiler.version>3.1</maven.compiler.version>
|
<maven.compiler.version>3.1</maven.compiler.version>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
<maven.dependency.version>3.1.1</maven.dependency.version>
|
<maven.dependency.version>3.1.1</maven.dependency.version>
|
||||||
</properties>
|
</properties>
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -23,7 +23,7 @@ public class WebLauncherLocal extends WebLauncher {
|
|||||||
// for local test:
|
// for local test:
|
||||||
ConfigBaseVariable.apiAdress = "http://0.0.0.0:19080/karusic/api/";
|
ConfigBaseVariable.apiAdress = "http://0.0.0.0:19080/karusic/api/";
|
||||||
//ConfigBaseVariable.ssoAdress = "https://atria-soft.org/karso/api/";
|
//ConfigBaseVariable.ssoAdress = "https://atria-soft.org/karso/api/";
|
||||||
ConfigBaseVariable.dbPort = "3307";
|
ConfigBaseVariable.dbPort = "3906";
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
super.migrateDB();
|
super.migrateDB();
|
||||||
|
@ -14,8 +14,8 @@ import jakarta.annotation.security.RolesAllowed;
|
|||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
|
import jakarta.ws.rs.PATCH;
|
||||||
import jakarta.ws.rs.POST;
|
import jakarta.ws.rs.POST;
|
||||||
import jakarta.ws.rs.PUT;
|
|
||||||
import jakarta.ws.rs.Path;
|
import jakarta.ws.rs.Path;
|
||||||
import jakarta.ws.rs.PathParam;
|
import jakarta.ws.rs.PathParam;
|
||||||
import jakarta.ws.rs.Produces;
|
import jakarta.ws.rs.Produces;
|
||||||
@ -46,7 +46,7 @@ public class AlbumResource {
|
|||||||
return DataAccess.insertWithJson(Album.class, jsonRequest);
|
return DataAccess.insertWithJson(Album.class, jsonRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PUT
|
@PATCH
|
||||||
@Path("{id}")
|
@Path("{id}")
|
||||||
@RolesAllowed("ADMIN")
|
@RolesAllowed("ADMIN")
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
@ -14,8 +14,8 @@ import jakarta.annotation.security.RolesAllowed;
|
|||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
|
import jakarta.ws.rs.PATCH;
|
||||||
import jakarta.ws.rs.POST;
|
import jakarta.ws.rs.POST;
|
||||||
import jakarta.ws.rs.PUT;
|
|
||||||
import jakarta.ws.rs.Path;
|
import jakarta.ws.rs.Path;
|
||||||
import jakarta.ws.rs.PathParam;
|
import jakarta.ws.rs.PathParam;
|
||||||
import jakarta.ws.rs.Produces;
|
import jakarta.ws.rs.Produces;
|
||||||
@ -46,7 +46,7 @@ public class ArtistResource {
|
|||||||
return DataAccess.insertWithJson(Artist.class, jsonRequest);
|
return DataAccess.insertWithJson(Artist.class, jsonRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PUT
|
@PATCH
|
||||||
@Path("{id}")
|
@Path("{id}")
|
||||||
@RolesAllowed("ADMIN")
|
@RolesAllowed("ADMIN")
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
@ -14,8 +14,8 @@ import jakarta.annotation.security.RolesAllowed;
|
|||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
|
import jakarta.ws.rs.PATCH;
|
||||||
import jakarta.ws.rs.POST;
|
import jakarta.ws.rs.POST;
|
||||||
import jakarta.ws.rs.PUT;
|
|
||||||
import jakarta.ws.rs.Path;
|
import jakarta.ws.rs.Path;
|
||||||
import jakarta.ws.rs.PathParam;
|
import jakarta.ws.rs.PathParam;
|
||||||
import jakarta.ws.rs.Produces;
|
import jakarta.ws.rs.Produces;
|
||||||
@ -46,7 +46,7 @@ public class GenderResource {
|
|||||||
return DataAccess.insertWithJson(Gender.class, jsonRequest);
|
return DataAccess.insertWithJson(Gender.class, jsonRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PUT
|
@PATCH
|
||||||
@Path("{id}")
|
@Path("{id}")
|
||||||
@RolesAllowed("ADMIN")
|
@RolesAllowed("ADMIN")
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
@ -14,8 +14,8 @@ import jakarta.annotation.security.RolesAllowed;
|
|||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
|
import jakarta.ws.rs.PATCH;
|
||||||
import jakarta.ws.rs.POST;
|
import jakarta.ws.rs.POST;
|
||||||
import jakarta.ws.rs.PUT;
|
|
||||||
import jakarta.ws.rs.Path;
|
import jakarta.ws.rs.Path;
|
||||||
import jakarta.ws.rs.PathParam;
|
import jakarta.ws.rs.PathParam;
|
||||||
import jakarta.ws.rs.Produces;
|
import jakarta.ws.rs.Produces;
|
||||||
@ -46,7 +46,7 @@ public class PlaylistResource {
|
|||||||
return DataAccess.insertWithJson(Playlist.class, jsonRequest);
|
return DataAccess.insertWithJson(Playlist.class, jsonRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PUT
|
@PATCH
|
||||||
@Path("{id}")
|
@Path("{id}")
|
||||||
@RolesAllowed("ADMIN")
|
@RolesAllowed("ADMIN")
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
@ -23,8 +23,8 @@ import jakarta.annotation.security.RolesAllowed;
|
|||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
|
import jakarta.ws.rs.PATCH;
|
||||||
import jakarta.ws.rs.POST;
|
import jakarta.ws.rs.POST;
|
||||||
import jakarta.ws.rs.PUT;
|
|
||||||
import jakarta.ws.rs.Path;
|
import jakarta.ws.rs.Path;
|
||||||
import jakarta.ws.rs.PathParam;
|
import jakarta.ws.rs.PathParam;
|
||||||
import jakarta.ws.rs.Produces;
|
import jakarta.ws.rs.Produces;
|
||||||
@ -55,7 +55,7 @@ public class TrackResource {
|
|||||||
return DataAccess.insertWithJson(Track.class, jsonRequest);
|
return DataAccess.insertWithJson(Track.class, jsonRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PUT
|
@PATCH
|
||||||
@Path("{id}")
|
@Path("{id}")
|
||||||
@RolesAllowed("ADMIN")
|
@RolesAllowed("ADMIN")
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
@ -129,7 +129,7 @@ export class AlbumEditScene implements OnInit {
|
|||||||
if (this.description === undefined) {
|
if (this.description === undefined) {
|
||||||
data.description = null;
|
data.description = null;
|
||||||
}
|
}
|
||||||
this.albumService.put(this.idAlbum, data);
|
this.albumService.patch(this.idAlbum, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
// At the drag drop area
|
// At the drag drop area
|
||||||
|
@ -167,7 +167,7 @@ export class ArtistEditScene implements OnInit {
|
|||||||
if (this.description === undefined) {
|
if (this.description === undefined) {
|
||||||
data.description = null;
|
data.description = null;
|
||||||
}
|
}
|
||||||
this.artistService.put(this.idArtist, data);
|
this.artistService.patch(this.idArtist, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
// At the drag drop area
|
// At the drag drop area
|
||||||
|
@ -278,7 +278,7 @@ export class TrackEditScene implements OnInit {
|
|||||||
}
|
}
|
||||||
let tmpp = this.data.clone();
|
let tmpp = this.data.clone();
|
||||||
let self = this;
|
let self = this;
|
||||||
this.trackService.put(this.idTrack, data)
|
this.trackService.patch(this.idTrack, data)
|
||||||
.then((response3) => {
|
.then((response3) => {
|
||||||
self.dataOri = tmpp;
|
self.dataOri = tmpp;
|
||||||
self.updateNeedSend();
|
self.updateNeedSend();
|
||||||
|
@ -128,8 +128,8 @@ export class GenericInterfaceModelDB {
|
|||||||
return this.bdd.addAfterPost(this.serviceName, ret);
|
return this.bdd.addAfterPost(this.serviceName, ret);
|
||||||
|
|
||||||
}
|
}
|
||||||
put(id:number, data:any):any {
|
patch(id: number, data: any): any {
|
||||||
let ret = this.http.putSpecific([this.serviceName, id], data);
|
let ret = this.http.patchSpecific([this.serviceName, id], data);
|
||||||
return this.bdd.setAfterPut(this.serviceName, id, ret);
|
return this.bdd.setAfterPut(this.serviceName, id, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit ea5a4f6b7537eb707916f4610bf79fbe86c6296f
|
Subproject commit c3489422f2df7f16465b4358e868664af9cda81c
|
Loading…
x
Reference in New Issue
Block a user