This commit is contained in:
xander 2022-03-08 03:00:02 -12:00
parent 190d716366
commit fbb392188c
3 changed files with 2 additions and 5 deletions

View File

@ -38,10 +38,6 @@ class RegisterController extends Controller
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
/**
* Get a validator for an incoming registration request.

View File

@ -17,7 +17,7 @@ export function CreateAccount(form)
var badInputs = [];
return new Promise(async (resolve, reject)=>{
await axios.post(`${protocol}apis.${url}/account/register`, body, {headers: {'X-CSRF-TOKEN': document.querySelector(`meta[name="csrf-token"]`).content, "X-Requested-With":"XMLHttpRequest"}}).then(data=>{
await axios.post(`${protocol}apis.${url}/account/register`, body, {headers: {'X-CSRF-TOKEN': document.querySelector(`meta[name="csrf-token"]`).content, "X-Requested-With":"XMLHttpRequest", "accept":"application/json"}}).then(data=>{
const res = data.data;
if (res.badInputs.length >= 1) {
badInputs=res.badInputs;

View File

@ -45,6 +45,7 @@ const RegisterForm = (props) => {
if (res != `good`) {
setValidity({error: true, message:res.message, inputs: res.inputs});
setTimeout(()=>{setValidity({...validity, error: false, inputs: res.inputs});}, 4000);
return;
}
window.location.replace(`/home`);
}).catch(error=>console.log(error));