Fakultas Ilmu Komputer UI

Commit 2c0fa017 authored by Nabila Febri Viola's avatar Nabila Febri Viola
Browse files

[CHORES] Fix base url api

parent 2c4b33ed
......@@ -26,3 +26,18 @@ export const postUserLogout = () =>
detail: "SUCCESS",
},
})
export const postRegisterUser = async () =>
await fetch(`${BASE_API_URL}/auth/register-full/`, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: data,
})
.then(async response => {
return await response.json()
})
.then(async data => {
return data
})
......@@ -2,7 +2,7 @@ import React from "react"
import { Form } from "react-bootstrap"
import { useForm } from "react-hook-form"
import * as yup from "yup"
import { BASE_API_URL } from "./config"
import { BASE_API_URL } from "../config"
import ModalRegisterAccount from "./register-account"
......
......@@ -103,7 +103,8 @@ const ModalRegisterAccount = ({
<div className="row px-5 mt-5 mb-3">
<div className="text-right col-md-12 mr-3 ml-4">
<Button
className="btn btn-red shadow"
data-testid="btn-register"
variant="btn btn-red shadow"
onClick={async () => {
await triggerValidation()
if (!errors.email && !errors.passwordConfirmation) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment