From c1147f02ae77d96a557eb75908de0cc3308afa41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Cape=C3=A1ns=20P=C3=A9rez?= Date: Mon, 27 Apr 2020 17:03:17 +0200 Subject: [PATCH] fixed some stuff not working on automations --- .../smarthut/controller/ScenePriorityController.java | 4 ---- .../inf/sa4/sanmarinoes/smarthut/models/ScenePriority.java | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ScenePriorityController.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ScenePriorityController.java index 8711d57..6e95f75 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ScenePriorityController.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ScenePriorityController.java @@ -24,10 +24,6 @@ public class ScenePriorityController { @Autowired ScenePriorityRepository scenePriorityRepository; - @GetMapping("/{id}") - public ScenePriority get(@PathVariable long id) throws NotFoundException { - return scenePriorityRepository.findById(id).orElseThrow(NotFoundException::new); - } @GetMapping("/{automationId}") public List getByAutomationId(@PathVariable long automationId) diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/ScenePriority.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/ScenePriority.java index d34714b..04586d9 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/ScenePriority.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/ScenePriority.java @@ -41,7 +41,7 @@ public class ScenePriority { @GsonExclude private Scene scene; - @Column(name = "scene_id", nullable = false, updatable = false, unique = true) + @Column(name = "scene_id", nullable = false, updatable = false) @NotNull private Long sceneId;