Created Woodpecker CI/CD deployment
All checks were successful
ci/woodpecker/tag/api_build Pipeline was successful
ci/woodpecker/tag/api_uploadimage Pipeline was successful
ci/woodpecker/tag/web_uploadimage Pipeline was successful

- Created Dockerfile for packing up API and Web projects as Docker image
This commit is contained in:
2023-03-27 21:48:25 -05:00
parent baf38aa3cd
commit 9bbd12e4c3
145 changed files with 30955 additions and 18248 deletions

View File

@ -0,0 +1,40 @@
using AutoMapper;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Net;
using YABA.API.Settings;
using YABA.API.ViewModels;
using YABA.Service.Interfaces;
namespace YABA.API.Controllers
{
[ApiController]
[ApiVersion("1")]
[Authorize, Route("api/v{version:apiVersion}/[controller]")]
public class MiscController : ControllerBase
{
private readonly IMapper _mapper;
private readonly IMiscService _miscService;
public MiscController(
IMapper mapper,
IMiscService miscService)
{
_mapper = mapper;
_miscService = miscService;
}
[HttpGet]
[DevOnly]
[Route("GetWebsiteMetaData")]
[ProducesResponseType(typeof(GetWebsiteMetaDataResponse), (int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.BadRequest)]
public IActionResult GetWebsiteMetaData(string url)
{
if (string.IsNullOrEmpty(url)) return BadRequest();
var response = _miscService.GetWebsiteMetaData(url);
return Ok(_mapper.Map<GetWebsiteMetaDataResponse>(response));
}
}
}