ChestController

 avatar
unknown
java
a month ago
632 B
1
Indexable
package brodev.hu.kinyeri.kinyeri.hu.Controllers;

import brodev.hu.kinyeri.kinyeri.hu.Services.ChestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/chest")
public class ChestController {

    private final ChestService chestService;

    @Autowired
    public ChestController(ChestService chestService) {
        this.chestService = chestService;
    }

    @GetMapping ("/open/{id}")
    public String[] openChest(@PathVariable("id") int id) {
        return chestService.openChest(id);
    }
}
Editor is loading...
Leave a Comment