File tree 2 files changed +5
-5
lines changed
src/main/java/ru/mystamps/web/service
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ public List<FirstLevelCategoryDto> findFirstLevelCategories(String lang) {
142
142
if (createNewItem ) {
143
143
lastParent = parent ;
144
144
if (categoryWithoutParent ) {
145
- lastItem = new FirstLevelCategoryDto (name , slug );
145
+ lastItem = new FirstLevelCategoryDto (slug , name );
146
146
} else {
147
147
lastItem = new FirstLevelCategoryDto (parent );
148
148
lastItem .addChild (slug , name );
Original file line number Diff line number Diff line change 28
28
@ Getter
29
29
@ ToString
30
30
public class FirstLevelCategoryDto {
31
- private final String name ;
32
31
private final String slug ;
32
+ private final String name ;
33
33
private final List <EntityWithSlugDto > children = new ArrayList <>();
34
34
35
- public FirstLevelCategoryDto (String name , String slug ) {
36
- this .name = name ;
35
+ public FirstLevelCategoryDto (String slug , String name ) {
37
36
this .slug = slug ;
37
+ this .name = name ;
38
38
}
39
39
40
40
public FirstLevelCategoryDto (String name ) {
41
- this (name , null );
41
+ this (null , name );
42
42
}
43
43
44
44
public void addChild (String slug , String name ) {
You can’t perform that action at this time.
0 commit comments