Created Woodpecker CI/CD deployment
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- Created Dockerfile for packing up API and Web projects as Docker image
This commit is contained in:
26
API/YABA.API/Settings/AutoMapperProfile.cs
Normal file
26
API/YABA.API/Settings/AutoMapperProfile.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using AutoMapper;
|
||||
using System.Net;
|
||||
using YABA.API.ViewModels;
|
||||
using YABA.API.ViewModels.Bookmarks;
|
||||
using YABA.API.ViewModels.Tags;
|
||||
using YABA.Common.DTOs;
|
||||
using YABA.Common.DTOs.Bookmarks;
|
||||
using YABA.Common.DTOs.Tags;
|
||||
|
||||
namespace YABA.API.Settings
|
||||
{
|
||||
public class AutoMapperProfile : Profile
|
||||
{
|
||||
public AutoMapperProfile()
|
||||
{
|
||||
CreateMap<UserDTO, UserResponse>();
|
||||
CreateMap<BookmarkDTO, BookmarkResponse>()
|
||||
.ForMember(dest => dest.Title, opt => opt.MapFrom(src => WebUtility.HtmlDecode(src.Title)))
|
||||
.ForMember(dest => dest.Description, opt => opt.MapFrom(src => WebUtility.HtmlDecode(src.Description)));
|
||||
CreateMap<WebsiteMetaDataDTO, GetWebsiteMetaDataResponse>();
|
||||
CreateMap<BookmarkDTO, PatchBookmarkRequest>();
|
||||
CreateMap<PatchBookmarkRequest, UpdateBookmarkRequestDTO>();
|
||||
CreateMap<TagDTO, TagResponse>().ReverseMap();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user