feat: implement medal feature

This commit is contained in:
Tim
2025-08-09 02:08:02 +08:00
parent 9c1cedd172
commit 987fe0d885
11 changed files with 269 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
package com.openisle.controller;
import com.openisle.dto.MedalDto;
import com.openisle.service.MedalService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/api/medals")
@RequiredArgsConstructor
public class MedalController {
private final MedalService medalService;
@GetMapping
public List<MedalDto> getMedals(@RequestParam(value = "userId", required = false) Long userId) {
return medalService.getMedals(userId);
}
}