Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/io/spring/api/ArticleApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class ArticleApi {
private ArticleCommandService articleCommandService;

@GetMapping
public ResponseEntity<?> article(
public ResponseEntity<Map<String, Object>> article(
@PathVariable("slug") String slug, @AuthenticationPrincipal User user) {
return articleQueryService
.findBySlug(slug, user)
Expand All @@ -42,7 +42,7 @@ public ResponseEntity<?> article(
}

@PutMapping
public ResponseEntity<?> updateArticle(
public ResponseEntity<Map<String, Object>> updateArticle(
@PathVariable("slug") String slug,
@AuthenticationPrincipal User user,
@Valid @RequestBody UpdateArticleParam updateArticleParam) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/spring/api/CommentsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class CommentsApi {
private CommentQueryService commentQueryService;

@PostMapping
public ResponseEntity<?> createComment(
public ResponseEntity<Map<String, Object>> createComment(
@PathVariable("slug") String slug,
@AuthenticationPrincipal User user,
@Valid @RequestBody NewCommentParam newCommentParam) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@SuppressWarnings("serial")
public class InvalidRequestException extends RuntimeException {
private final Errors errors;
private final transient Errors errors;

public InvalidRequestException(Errors errors) {
super("");
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/spring/core/article/Article.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ public void update(String title, String description, String body) {
}

public static String toSlug(String title) {
return title.toLowerCase().replaceAll("[\\&|[\\uFE30-\\uFFA0]|\\’|\\”|\\s\\?\\,\\.]+", "-");
return title.toLowerCase().replaceAll("[&|\\uFE30-\\uFFA0’”\\s?,.]+", "-");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Slug character set remains unchanged

The flattened class preserves every previous member, including literal pipes and U+FE30–U+FFA0. Existing slug output remains unchanged.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public class DefaultJwtServiceTest {

@BeforeEach
public void setUp() {
jwtService = new DefaultJwtService("123123123123123123123123123123123123123123123123123123123123", 3600);
jwtService =
new DefaultJwtService("123123123123123123123123123123123123123123123123123123123123", 3600);
}

@Test
Expand Down