4 attempt to pass pipeline

This commit is contained in:
omenem 2020-04-09 15:38:03 +02:00
parent 79b39de6bb
commit 0872d7654f
2 changed files with 3 additions and 7 deletions

View File

@ -1,7 +1,6 @@
package ch.usi.inf.sa4.sanmarinoes.smarthut.dto;
import javax.validation.constraints.NotNull;
import org.springframework.core.io.FileSystemResource;
public class SecurityCameraSaveRequest {
@ -20,7 +19,7 @@ public class SecurityCameraSaveRequest {
/** The name of the device as assigned by the user (e.g. 'Master bedroom light') */
@NotNull private String name;
private FileSystemResource surveillanceVideo;
private String path;
public void setRoomId(Long roomId) {
this.roomId = roomId;

View File

@ -1,6 +1,5 @@
package ch.usi.inf.sa4.sanmarinoes.smarthut.models;
import java.io.File;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.validation.constraints.NotNull;
@ -20,12 +19,10 @@ public class SecurityCamera extends Switchable {
@Column(name = "video", nullable = false)
@NotNull
private FileSystemResource surveillanceVideo =
new FileSystemResource(
(new File("backend/media/security_camera_videos/security_camera_1.mp4")));
private String path = "backend/media/security_camera_videos/security_camera_1.mp4";
public FileSystemResource getSurveillanceVideo() {
return surveillanceVideo;
return new FileSystemResource(path);
}
@Override