Account controller
This commit is contained in:
44
WebAPI/Controllers/AccountController.cs
Normal file
44
WebAPI/Controllers/AccountController.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using WebAPI.Data;
|
||||
using WebAPI.Data.Models;
|
||||
|
||||
namespace WebAPI.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class AccountController : ControllerBase
|
||||
{
|
||||
private readonly PterodactylService _pterodactylService;
|
||||
private readonly AppDbContext _appDbContext;
|
||||
|
||||
public AccountController(PterodactylService pterodactylService, AppDbContext appDbContext)
|
||||
{
|
||||
_pterodactylService = pterodactylService;
|
||||
_appDbContext = appDbContext;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("IsInitialized")]
|
||||
public async Task<bool> IsUserInitialized()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("Initialize")]
|
||||
public async Task InitializeUser(string email)
|
||||
{
|
||||
if (await IsUserInitialized())
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user