[DEV] update to the new model system

This commit is contained in:
Edouard DUPIN 2024-01-19 00:42:34 +01:00
parent 511c6d0bc7
commit 516a0bbfa0
12 changed files with 283 additions and 283 deletions

View File

@ -6,8 +6,8 @@
<properties>
<maven.compiler.version>3.1</maven.compiler.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<maven.dependency.version>3.1.1</maven.dependency.version>
</properties>
<repositories>

View File

@ -23,7 +23,7 @@ public class WebLauncherLocal extends WebLauncher {
// for local test:
ConfigBaseVariable.apiAdress = "http://0.0.0.0:19080/karusic/api/";
//ConfigBaseVariable.ssoAdress = "https://atria-soft.org/karso/api/";
ConfigBaseVariable.dbPort = "3307";
ConfigBaseVariable.dbPort = "3906";
}
try {
super.migrateDB();

View File

@ -14,8 +14,8 @@ import jakarta.annotation.security.RolesAllowed;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.DELETE;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.PATCH;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
@ -46,7 +46,7 @@ public class AlbumResource {
return DataAccess.insertWithJson(Album.class, jsonRequest);
}
@PUT
@PATCH
@Path("{id}")
@RolesAllowed("ADMIN")
@Consumes(MediaType.APPLICATION_JSON)

View File

@ -14,8 +14,8 @@ import jakarta.annotation.security.RolesAllowed;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.DELETE;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.PATCH;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
@ -46,7 +46,7 @@ public class ArtistResource {
return DataAccess.insertWithJson(Artist.class, jsonRequest);
}
@PUT
@PATCH
@Path("{id}")
@RolesAllowed("ADMIN")
@Consumes(MediaType.APPLICATION_JSON)

View File

@ -14,8 +14,8 @@ import jakarta.annotation.security.RolesAllowed;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.DELETE;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.PATCH;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
@ -46,7 +46,7 @@ public class GenderResource {
return DataAccess.insertWithJson(Gender.class, jsonRequest);
}
@PUT
@PATCH
@Path("{id}")
@RolesAllowed("ADMIN")
@Consumes(MediaType.APPLICATION_JSON)

View File

@ -14,8 +14,8 @@ import jakarta.annotation.security.RolesAllowed;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.DELETE;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.PATCH;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
@ -46,7 +46,7 @@ public class PlaylistResource {
return DataAccess.insertWithJson(Playlist.class, jsonRequest);
}
@PUT
@PATCH
@Path("{id}")
@RolesAllowed("ADMIN")
@Consumes(MediaType.APPLICATION_JSON)

View File

@ -23,8 +23,8 @@ import jakarta.annotation.security.RolesAllowed;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.DELETE;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.PATCH;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
@ -55,7 +55,7 @@ public class TrackResource {
return DataAccess.insertWithJson(Track.class, jsonRequest);
}
@PUT
@PATCH
@Path("{id}")
@RolesAllowed("ADMIN")
@Consumes(MediaType.APPLICATION_JSON)

View File

@ -129,7 +129,7 @@ export class AlbumEditScene implements OnInit {
if (this.description === undefined) {
data.description = null;
}
this.albumService.put(this.idAlbum, data);
this.albumService.patch(this.idAlbum, data);
}
// At the drag drop area

View File

@ -167,7 +167,7 @@ export class ArtistEditScene implements OnInit {
if (this.description === undefined) {
data.description = null;
}
this.artistService.put(this.idArtist, data);
this.artistService.patch(this.idArtist, data);
}
// At the drag drop area

View File

@ -278,7 +278,7 @@ export class TrackEditScene implements OnInit {
}
let tmpp = this.data.clone();
let self = this;
this.trackService.put(this.idTrack, data)
this.trackService.patch(this.idTrack, data)
.then((response3) => {
self.dataOri = tmpp;
self.updateNeedSend();

View File

@ -128,8 +128,8 @@ export class GenericInterfaceModelDB {
return this.bdd.addAfterPost(this.serviceName, ret);
}
put(id:number, data:any):any {
let ret = this.http.putSpecific([this.serviceName, id], data);
patch(id: number, data: any): any {
let ret = this.http.patchSpecific([this.serviceName, id], data);
return this.bdd.setAfterPut(this.serviceName, id, ret);
}

@ -1 +1 @@
Subproject commit ea5a4f6b7537eb707916f4610bf79fbe86c6296f
Subproject commit c3489422f2df7f16465b4358e868664af9cda81c