adding admin exists api
This commit is contained in:
parent
8156aeb495
commit
f8d7581a12
3 changed files with 31 additions and 0 deletions
24
API/Controllers/AdminController.cs
Normal file
24
API/Controllers/AdminController.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System.Threading.Tasks;
|
||||
using API.Interfaces;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace API.Controllers
|
||||
{
|
||||
public class AdminController : BaseApiController
|
||||
{
|
||||
private readonly IUserRepository _userRepository;
|
||||
|
||||
public AdminController(IUserRepository userRepository)
|
||||
{
|
||||
_userRepository = userRepository;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<bool>> AdminExists()
|
||||
{
|
||||
return await _userRepository.AdminExists();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue