add(AuthController):新增鉴权控制器
fix(model):修复数据库字段映射问题
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using AutoMapper;
|
||||
using IM_API.Dtos;
|
||||
using IM_API.Models;
|
||||
|
||||
namespace IM_API.Configs
|
||||
{
|
||||
public class MapperConfig:Profile
|
||||
{
|
||||
public MapperConfig()
|
||||
{
|
||||
CreateMap<User, UserInfoDto>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,16 @@
|
||||
namespace IM_API.Configs
|
||||
using IM_API.Interface.Services;
|
||||
using IM_API.Services;
|
||||
|
||||
namespace IM_API.Configs
|
||||
{
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
public static IServiceCollection AddAllService(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.AddAutoMapper(typeof(MapperConfig));
|
||||
services.AddTransient<IAuthService, AuthService>();
|
||||
services.AddSingleton<IJWTService, JWTService>();
|
||||
services.AddSingleton<IRefreshTokenService,RedisRefreshTokenService>();
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user