generated from muhtadeetaron/nextjs-template
fix(api): fix api endpoint logic #3
This commit is contained in:
@ -28,7 +28,7 @@ export const login = async (
|
||||
form: LoginForm,
|
||||
setToken: SetTokenFn
|
||||
): Promise<void> => {
|
||||
const response = await fetch(`${API_URL}/auth/login`, {
|
||||
const response = await fetch(`${API_URL}/auth/login/`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@ -50,7 +50,7 @@ export const register = async (
|
||||
form: RegisterForm,
|
||||
setToken: SetTokenFn
|
||||
): Promise<void> => {
|
||||
const response = await fetch(`${API_URL}/auth/register`, {
|
||||
const response = await fetch(`${API_URL}/auth/register/`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
Reference in New Issue
Block a user