You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.8 KiB
C#
66 lines
1.8 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Txgy.RBS.DbModel.Models;
|
|
using Txgy.RBS.Framework.Api;
|
|
using Txgy.RBS.IServices;
|
|
using Txgy.RBS.Services;
|
|
|
|
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
|
|
|
namespace Txgy.RBS.Server.WebApi.Controllers
|
|
{
|
|
[Route("api/[controller]/[action]")]
|
|
[ApiController]
|
|
public class ProjectInfoController : ControllerBase
|
|
{
|
|
private readonly IProjectInfoService _projectInfoService;
|
|
|
|
public ProjectInfoController(ILogger<ProjectInfoController> logger, IProjectInfoService projectInfoService)
|
|
{
|
|
this._projectInfoService = projectInfoService;
|
|
}
|
|
|
|
[HttpPost]
|
|
public ApiResult AddProjectInfo(ProjectInfoDTO project)
|
|
{
|
|
return _projectInfoService.AddProjectInfo(project);
|
|
}
|
|
|
|
[HttpDelete("{id}")]
|
|
public ApiResult DeleteProjectInfo(int id)
|
|
{
|
|
return _projectInfoService.DeleteProjectInfo(id);
|
|
}
|
|
|
|
[HttpPost]
|
|
public ApiResult UpdateProjectInfo(ProjectInfoDTO project)
|
|
{
|
|
return _projectInfoService.UpdateProjectInfo(project);
|
|
}
|
|
|
|
[HttpGet("{id}")]
|
|
public ProjectInfoDTO GetProjectInfo(int id)
|
|
{
|
|
return _projectInfoService.GetProjectInfo(id);
|
|
}
|
|
|
|
[HttpGet]
|
|
public List<ProjectInfoDTO> GetAllProjectInfo()
|
|
{
|
|
return _projectInfoService.GetAllProjectInfo();
|
|
}
|
|
|
|
[HttpGet]
|
|
public ProjectInfoDTO GetCurrentProjectInfo()
|
|
{
|
|
return _projectInfoService.GetCurrentProjectInfo();
|
|
}
|
|
|
|
//[HttpPost]
|
|
//public void Post([FromBody] string value)
|
|
//{
|
|
|
|
//}
|
|
|
|
}
|
|
}
|