Merge pull request 'authlocalstorage' (#46) from authlocalstorage into main

Reviewed-on: #46
This commit was merged in pull request #46.
This commit is contained in:
2025-10-15 15:34:04 +00:00
3 changed files with 33 additions and 11 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ export const apiClient = axios.create({
export const login = async (username, password) => {
try {
const response = await apiClient.post("/users/login", { username, password })
return response.data
return response
} catch (error) {
throw error
}
@@ -30,7 +30,7 @@ export const login = async (username, password) => {
export const register = async (username, email, password, fname, lname, phone) => {
try {
const response = await apiClient.post("/users/create", { username, email, password, fname, lname, phone })
return { ...response.data, status: response.status }
return response
} catch (error) {
throw error
}