feat: delete curl

This commit is contained in:
Tim
2025-07-01 10:22:43 +08:00
parent e8f4fd8175
commit 664d7de105
6 changed files with 0 additions and 76 deletions

View File

@@ -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.
*/

View File

@@ -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

View File

@@ -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 <token>" \
-d '{ "content": "Nice post" }'
curl -X POST http://localhost:8080/api/comments/1/replies \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{ "content": "Thanks!" }'
curl http://localhost:8080/api/posts/1/comments \
-H "Authorization: Bearer <token>"
*/
@RestController
@RequestMapping("/api")
@RequiredArgsConstructor

View File

@@ -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")

View File

@@ -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 <token>"
*/
@RestController
@RequestMapping("/api/posts")
@RequiredArgsConstructor

View File

@@ -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 <token>" \
-d '{ "type": "LIKE" }'
curl -X POST http://localhost:8080/api/comments/1/reactions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{ "type": "LIKE" }'
*/
@RestController
@RequestMapping("/api")
@RequiredArgsConstructor