package com.izouma.nineth.web.mobile.open.v1;


import com.izouma.nineth.dto.UserRankDTO;
import com.izouma.nineth.service.ActivityCollectionService;
import com.izouma.nineth.web.BaseController;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
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("/activityCollection/v1")
@AllArgsConstructor
public class ActivityCollectionControllerOpenV1{
    private final ActivityCollectionService activityCollectionService;


    @PostMapping("/getRanking")
    public List<UserRankDTO> getRanking(@RequestParam int type, @RequestParam int start, @RequestParam int count ,@RequestParam(required = false) int projectId) {
        List<UserRankDTO> dataList = activityCollectionService.getRanking(type,start,count,projectId);
        return dataList;
    }


}

