mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-15 19:41:02 +08:00
fix: 后端代码格式化
This commit is contained in:
@@ -5,21 +5,25 @@ import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import java.util.Map;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Simple admin demo endpoint.
|
||||
*/
|
||||
@RestController
|
||||
public class AdminController {
|
||||
@GetMapping("/api/admin/hello")
|
||||
@SecurityRequirement(name = "JWT")
|
||||
@Operation(summary = "Admin greeting", description = "Returns a greeting for admin users")
|
||||
@ApiResponse(responseCode = "200", description = "Greeting payload",
|
||||
content = @Content(schema = @Schema(implementation = Map.class)))
|
||||
public Map<String, String> adminHello() {
|
||||
return Map.of("message", "Hello, Admin User");
|
||||
}
|
||||
|
||||
@GetMapping("/api/admin/hello")
|
||||
@SecurityRequirement(name = "JWT")
|
||||
@Operation(summary = "Admin greeting", description = "Returns a greeting for admin users")
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "Greeting payload",
|
||||
content = @Content(schema = @Schema(implementation = Map.class))
|
||||
)
|
||||
public Map<String, String> adminHello() {
|
||||
return Map.of("message", "Hello, Admin User");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user