fix signup url
All checks were successful
Build and Push Docker Image / Build image (push) Successful in 1m31s
All checks were successful
Build and Push Docker Image / Build image (push) Successful in 1m31s
This commit is contained in:
parent
e81b7abd1a
commit
f8647c50ae
@ -7,7 +7,7 @@ import { fetchToken } from "./login";
|
||||
|
||||
const signUp = async (username: string, password: string, token: string) => {
|
||||
try {
|
||||
const response = await api.post(`/signup?token=${token}`, {
|
||||
const response = await api.post(`/auth/signup?token=${token}`, {
|
||||
username: username,
|
||||
password: password,
|
||||
}, {
|
||||
@ -23,7 +23,7 @@ export function SignupPage(props: {}) {
|
||||
const [apiAuthenticated, setApiAuthenticated] = useContext(apiAuthenticatedContext)
|
||||
const [searchParam, setSearchParam] = useSearchParams();
|
||||
const token = searchParam.get('token');
|
||||
if (token === null){
|
||||
if (token === null) {
|
||||
return <Navigate to='/' />
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ export function SignupPage(props: {}) {
|
||||
const data = new FormData(event.currentTarget);
|
||||
const usernameFormData: FormDataEntryValue | null = data.get('username');
|
||||
const passwordFormData: FormDataEntryValue | null = data.get('password');
|
||||
if (usernameFormData === null || passwordFormData === null){
|
||||
if (usernameFormData === null || passwordFormData === null) {
|
||||
return
|
||||
}
|
||||
const username: string = usernameFormData.toString();
|
||||
|
Loading…
x
Reference in New Issue
Block a user