Feature: user upload artwork

This commit is contained in:
2025-10-25 02:22:39 -04:00
parent 28d0443f44
commit d376b48d5e
23 changed files with 1288 additions and 177 deletions

View File

@@ -19,12 +19,12 @@ export const useAuth = () => {
const response = await fetch('/api/users/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
username,
password,
}),
password
})
});
if (!response.ok) {
@@ -32,7 +32,7 @@ export const useAuth = () => {
}
const responseData = await response.json();
if (responseData.status === 'ok') {
setUser({username, isAuthenticated: true});
localStorage.setItem('user', JSON.stringify({username, isAuthenticated: true}));