API1.0.28 ExerciseTree description
This commit is contained in:
@@ -17,7 +17,7 @@ class ExerciseTreeController (private val exerciseTreeRepository: ExerciseTreeRe
|
||||
@GetMapping("/exercise_tree")
|
||||
fun getAllActiveMenu(): ResponseEntity<List<ExerciseTree>> {
|
||||
val list: List<ExerciseTree> = exerciseTreeRepository.getActiveMenu()
|
||||
logger.info(" -- Get All active Exercise Tree menu.. $list")
|
||||
logger.info(" -- Get All active Exercise Tree menu.")
|
||||
return if (list.isEmpty()) ResponseEntity.notFound().build() else
|
||||
ResponseEntity.ok().body(list)
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ data class ExerciseTree (
|
||||
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val treeId: Long = 0,
|
||||
|
||||
@Expose @get: NotBlank var name: String = "",
|
||||
@Expose @get: NotBlank var description: String = "",
|
||||
@Expose @get: NotBlank var imageUrl: String = "",
|
||||
@Expose @get: NonNull var active: Boolean?
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ data class ExerciseTreeTranslation (
|
||||
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val translationId: Long = 0,
|
||||
|
||||
@Expose @get: NotBlank var languageCode: String?,
|
||||
@Expose @get: NotBlank var name: String = ""
|
||||
@Expose @get: NotBlank var name: String = "",
|
||||
@Expose @get: NotBlank var description: String = ""
|
||||
|
||||
|
||||
) {
|
||||
|
||||
@@ -17,6 +17,6 @@ logging.config=classpath:logback-spring.xml
|
||||
logging.file=logs
|
||||
|
||||
# if the database structure has been changed, increment this version number
|
||||
application.version=1.0.27
|
||||
application.version=1.0.28
|
||||
|
||||
jwt.secret=aitrainer
|
||||
@@ -17,6 +17,6 @@ logging.config=classpath:logback-spring.xml
|
||||
logging.file=logs
|
||||
|
||||
# if the database structure has been changed, increment this version number
|
||||
application.version=1.0.27
|
||||
application.version=1.0.28
|
||||
|
||||
jwt.secret=aitrainer
|
||||
@@ -29,5 +29,9 @@ class ExerciseTreeTest {
|
||||
assertEquals(exerciseTreeItem.name, "Cardio")
|
||||
assertEquals(responseEntity.body!![1].translations[0].name, "Erő!")
|
||||
assertEquals(responseEntity.body!![0].abilities[0].exerciseAbilityId, 3)
|
||||
assertEquals(responseEntity.body!![15].name, "Test Center")
|
||||
assertEquals(responseEntity.body!![15].description, "Welcome")
|
||||
assertEquals(responseEntity.body!![15].translations[0].name, "Tesztközpont")
|
||||
assertEquals(responseEntity.body!![15].translations[0].description, "Üdv")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user