mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
First crack the API
This commit is contained in:
parent
64468cd9ed
commit
b366f8fadc
13 changed files with 139 additions and 24 deletions
22
NzbDrone.Api/Bootstrapper.cs
Normal file
22
NzbDrone.Api/Bootstrapper.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using AutoMapper;
|
||||
using NzbDrone.Api.QualityProfiles;
|
||||
using NzbDrone.Core.Repository.Quality;
|
||||
|
||||
namespace NzbDrone.Api
|
||||
{
|
||||
public static class Bootstrapper
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
Mapper.CreateMap<QualityProfile, QualityProfileModel>()
|
||||
.ForMember(dest => dest.Id, opt => opt.MapFrom(src => src.QualityProfileId));
|
||||
|
||||
Mapper.CreateMap<QualityProfileModel, QualityProfile>()
|
||||
.ForMember(dest => dest.QualityProfileId, opt => opt.MapFrom(src => src.Id));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue