mirror of
https://github.com/bitwarden/server.git
synced 2025-07-04 01:22:50 -05:00
Removed DocumentDB repositories and domain type dependencies for them. Moved account registration process to not require email address verification in preparation for client app registration process.
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Authorization;
|
||||
using Microsoft.AspNet.DataProtection;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Bit.Api.Models;
|
||||
using Bit.Core.Exceptions;
|
||||
@ -36,18 +35,11 @@ namespace Bit.Api.Controllers
|
||||
_currentContext = currentContext;
|
||||
}
|
||||
|
||||
[HttpPost("register-token")]
|
||||
[AllowAnonymous]
|
||||
public async Task PostRegisterToken([FromBody]RegisterTokenRequestModel model)
|
||||
{
|
||||
await _userService.InitiateRegistrationAsync(model.Email);
|
||||
}
|
||||
|
||||
[HttpPost("register")]
|
||||
[AllowAnonymous]
|
||||
public async Task PostRegister([FromBody]RegisterRequestModel model)
|
||||
{
|
||||
var result = await _userService.RegisterUserAsync(model.Token, model.ToUser(), model.MasterPasswordHash);
|
||||
var result = await _userService.RegisterUserAsync(model.ToUser(), model.MasterPasswordHash);
|
||||
if(result.Succeeded)
|
||||
{
|
||||
return;
|
||||
|
Reference in New Issue
Block a user