package com.dowstats.controllers

import com.dowstats.data.dto.controllers.WeaponDto
import com.dowstats.data.dto.controllers.ability.AbilityDto
import com.dowstats.data.dto.controllers.building.BuildingFullDto
import com.dowstats.data.dto.controllers.building.RaceBuildings
import com.dowstats.data.dto.controllers.research.ResearchDto
import com.dowstats.data.repositories.BuildingRepository
import com.dowstats.service.datamaps.AbilityService
import com.dowstats.service.datamaps.DowBuildingMappingService
import com.dowstats.service.datamaps.ResearchService
import com.dowstats.service.datamaps.WeaponService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.DeleteMapping
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController


@RestController
@RequestMapping("api/v1/ability")
class AbilityController @Autowired constructor(
    val abilityService: AbilityService,
) {

    @GetMapping("/{modId}/{abilityId}")
    fun getById(@PathVariable abilityId: Long, @PathVariable modId: Long): AbilityDto {
        return abilityService.getAbilityDto(abilityId, modId)
    }
}