package com.vote.system.controller;

import com.vctgo.common.core.web.domain.AjaxResult;
import com.vote.system.service.VoteLocationService;
import org.springframework.beans.factory.annotation.Autowired;
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("/location")
public class VoteLocationController {

    @Autowired
    private VoteLocationService voteLocationService;


    @GetMapping("/{districtId}")
    public AjaxResult getLocationName(@PathVariable("districtId") String districtId) {
        return AjaxResult.success(voteLocationService.getLocationName(districtId));
    }

}
