diff --git a/src/main/java/com/openisle/controller/AdminController.java b/src/main/java/com/openisle/controller/AdminController.java index faffb485b..2084ea196 100644 --- a/src/main/java/com/openisle/controller/AdminController.java +++ b/src/main/java/com/openisle/controller/AdminController.java @@ -4,12 +4,6 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import java.util.Map; -/* -✅ -curl http://localhost:8080/api/admin/hello \ - -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0X3VzZXIxIiwiaWF0IjoxNzUxMjg0OTU2LCJleHAiOjE3NTEzNzEzNTZ9.u84elcDTK2gIvuS4dKJCdE21pRSgY265fvdm9m9DnCQ" - */ - /** * Simple admin demo endpoint. */ diff --git a/src/main/java/com/openisle/controller/AuthController.java b/src/main/java/com/openisle/controller/AuthController.java index 6baf3f028..b852e64df 100644 --- a/src/main/java/com/openisle/controller/AuthController.java +++ b/src/main/java/com/openisle/controller/AuthController.java @@ -11,31 +11,6 @@ import org.springframework.web.bind.annotation.*; import java.util.Map; import java.util.Optional; -/* -✅ -curl -X POST http://localhost:8080/api/auth/register \ - -H "Content-Type: application/json" \ - -d '{ - "username": "test_user1", - "email": "1216414009@qq.com", - "password": "password" - }' -✅ -curl -X POST http://localhost:8080/api/auth/verify \ - -H "Content-Type: application/json" \ - -d '{ - "username": "test_user1", - "code": "451247" - }' -✅ -curl -X POST http://localhost:8080/api/auth/login \ - -H "Content-Type: application/json" \ - -d '{ - "username": "test_user1", - "password": "password" - }' - */ - @RestController @RequestMapping("/api/auth") @RequiredArgsConstructor diff --git a/src/main/java/com/openisle/controller/CommentController.java b/src/main/java/com/openisle/controller/CommentController.java index 92521d864..a2d59f7fd 100644 --- a/src/main/java/com/openisle/controller/CommentController.java +++ b/src/main/java/com/openisle/controller/CommentController.java @@ -12,21 +12,6 @@ import java.time.LocalDateTime; import java.util.List; import java.util.stream.Collectors; -/* -curl -X POST http://localhost:8080/api/posts/1/comments \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer " \ - -d '{ "content": "Nice post" }' - -curl -X POST http://localhost:8080/api/comments/1/replies \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer " \ - -d '{ "content": "Thanks!" }' - -curl http://localhost:8080/api/posts/1/comments \ - -H "Authorization: Bearer " - */ - @RestController @RequestMapping("/api") @RequiredArgsConstructor diff --git a/src/main/java/com/openisle/controller/HelloController.java b/src/main/java/com/openisle/controller/HelloController.java index d22ceff83..de9baf7e3 100644 --- a/src/main/java/com/openisle/controller/HelloController.java +++ b/src/main/java/com/openisle/controller/HelloController.java @@ -4,11 +4,6 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import java.util.Map; -/* -curl http://localhost:8080/api/hello \ - -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0X3VzZXIiLCJpYXQiOjE3NTEyODAzMjksImV4cCI6MTc1MTM2NjcyOX0.XNDGTQd1H9u3ZOYtnJaU5fL5zhtwyZZm5aX3vL_my1c" - */ - @RestController public class HelloController { @GetMapping("/api/hello") diff --git a/src/main/java/com/openisle/controller/PostController.java b/src/main/java/com/openisle/controller/PostController.java index 00517aca5..551310ab3 100644 --- a/src/main/java/com/openisle/controller/PostController.java +++ b/src/main/java/com/openisle/controller/PostController.java @@ -16,19 +16,6 @@ import java.time.LocalDateTime; import java.util.List; import java.util.stream.Collectors; -/* -curl -X POST http://localhost:8080/api/posts \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0X3VzZXIxIiwiaWF0IjoxNzUxMjg0OTU2LCJleHAiOjE3NTEzNzEzNTZ9.u84elcDTK2gIvuS4dKJCdE21pRSgY265fvdm9m9DnCQ" \ - -d '{ "title": "First", "content": "Post" }' - -curl http://localhost:8080/api/posts \ - -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0X3VzZXIxIiwiaWF0IjoxNzUxMjg0OTU2LCJleHAiOjE3NTEzNzEzNTZ9.u84elcDTK2gIvuS4dKJCdE21pRSgY265fvdm9m9DnCQ" - -curl http://localhost:8080/api/posts/1 \ - -H "Authorization: Bearer " - */ - @RestController @RequestMapping("/api/posts") @RequiredArgsConstructor diff --git a/src/main/java/com/openisle/controller/ReactionController.java b/src/main/java/com/openisle/controller/ReactionController.java index cfe9e8946..607b1cfff 100644 --- a/src/main/java/com/openisle/controller/ReactionController.java +++ b/src/main/java/com/openisle/controller/ReactionController.java @@ -9,18 +9,6 @@ import org.springframework.http.ResponseEntity; import org.springframework.security.core.Authentication; import org.springframework.web.bind.annotation.*; -/* -curl -X POST http://localhost:8080/api/posts/1/reactions \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer " \ - -d '{ "type": "LIKE" }' - -curl -X POST http://localhost:8080/api/comments/1/reactions \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer " \ - -d '{ "type": "LIKE" }' - */ - @RestController @RequestMapping("/api") @RequiredArgsConstructor