ibms-dome/FrontendWebApi/ApiControllers/UserController.cs
2022-10-14 16:08:54 +08:00

43 lines
1.3 KiB
C#

using FrontendWebApi.Jwt;
using FrontendWebApi.Models;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Repository.BackendRepository.Interface;
using Repository.BaseRepository.Interface;
using Repository.FrontendRepository.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
namespace FrontendWebApi.ApiControllers
{
//[ApiController]
public class UserController : MyBaseApiController<UserController>
{
private readonly IBackendRepository backendRepository;
private readonly IFrontendRepository frontendRepository;
public UserController
(
IBackendRepository backendRepository,
IFrontendRepository frontendRepository
)
{
this.backendRepository = backendRepository;
this.frontendRepository = frontendRepository;
}
[HttpPost]
[Route("api/AddUser")]
public async Task<ApiResult<JwtGet>> AddUser([FromBody]bool str)
{
var a = User.Claims.Select(p => new { p.Type, p.Value });
ApiResult<JwtGet> apiResult = new ApiResult<JwtGet>(jwt_str);
apiResult.Data = myUser;
return apiResult;
}
}
}