Compare commits

..

1 Commits
v0.0.2 ... main

Author SHA1 Message Date
f8647c50ae fix signup url
All checks were successful
Build and Push Docker Image / Build image (push) Successful in 1m31s
2025-04-09 03:49:17 +03:00

View File

@ -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();