diff --git a/backend/src/main/java/com/example/backend/BackendApplication.java b/backend/src/main/java/com/example/backend/BackendApplication.java index 2f85ea0..96741c9 100644 --- a/backend/src/main/java/com/example/backend/BackendApplication.java +++ b/backend/src/main/java/com/example/backend/BackendApplication.java @@ -44,6 +44,9 @@ public class BackendApplication implements CommandLineRunner { final var u7 = new UserEntity(null, "7", "1234"); final var cat1 = new CategorieEntity(null, "Драма", null); + final var cat2 = new CategorieEntity(null, "Комедия", null); + final var cat3 = new CategorieEntity(null, "Хоррор", null); + final var cat4 = new CategorieEntity(null, "Мультитк", null); admin.setRole(UserRole.ADMIN); vasya.setRole(UserRole.USER); @@ -67,6 +70,9 @@ public class BackendApplication implements CommandLineRunner { userService.create(u7); categorieService.create(cat1); + categorieService.create(cat2); + categorieService.create(cat3); + categorieService.create(cat4); _logger.info("Admin user added"); } diff --git a/backend/src/main/java/com/example/backend/categories/api/CategorieController.java b/backend/src/main/java/com/example/backend/categories/api/CategorieController.java index b4c4c88..adb37d3 100644 --- a/backend/src/main/java/com/example/backend/categories/api/CategorieController.java +++ b/backend/src/main/java/com/example/backend/categories/api/CategorieController.java @@ -84,7 +84,7 @@ public class CategorieController { if (!imageFile.isEmpty()) { Path fileNameAndPath = Paths.get(UPLOAD_DIR, imageFile.getOriginalFilename()); Files.write(fileNameAndPath, imageFile.getBytes()); - category.setImage("/uploads/" + imageFile.getOriginalFilename()); + // category.setImage("/uploads/" + imageFile.getOriginalFilename()); } categorieService.create(category); } catch (IOException e) { diff --git a/backend/src/main/resources/templates/categorie-edit.html b/backend/src/main/resources/templates/categorie-edit.html index 0f981be..63f134b 100644 --- a/backend/src/main/resources/templates/categorie-edit.html +++ b/backend/src/main/resources/templates/categorie-edit.html @@ -7,92 +7,24 @@
-
- - - - -
- - -
-
- - -
- -
-
- - - - -
- Вернуться на категории -
- - - - - - - - - - - + Отмена + + + - --> \ No newline at end of file + \ No newline at end of file diff --git a/backend/src/main/resources/templates/categories.html b/backend/src/main/resources/templates/categories.html index 1c7168f..1238bd5 100644 --- a/backend/src/main/resources/templates/categories.html +++ b/backend/src/main/resources/templates/categories.html @@ -28,10 +28,12 @@

Данные отсутствуют

-
-
-
- +
+
+
+
diff --git a/data.mv.db b/data.mv.db index c56ab13..b0fb2e9 100644 Binary files a/data.mv.db and b/data.mv.db differ