Appwrite Fix 1.

Hopefully i can create accounts
This commit is contained in:
2026-01-29 16:56:27 +01:00
parent 5ba12cb738
commit a28ca580d2
8 changed files with 561 additions and 6 deletions

9
client/.env.production Normal file
View File

@@ -0,0 +1,9 @@
# EmailSorter Production - emailsorter.webklar.com
# Wird bei "npm run build" verwendet (Vite lädt .env.production)
# Appwrite (appwrite.webklar.com)
VITE_APPWRITE_ENDPOINT=https://appwrite.webklar.com/v1
VITE_APPWRITE_PROJECT_ID=696d0949001c70d6c6da
# Backend API (relativ oder absolute URL)
VITE_API_URL=https://api.emailsorter.webklar.com

View File

@@ -18,17 +18,11 @@ export { ID }
export const auth = {
// Create a new account
async register(email: string, password: string, name?: string) {
// #region agent log
fetch('http://127.0.0.1:7242/ingest/4fa7412d-6f79-4871-8728-29c37c9e5772',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({location:'appwrite.ts:20',message:'register called',data:{endpoint:APPWRITE_ENDPOINT,origin:window.location.origin,email},timestamp:Date.now(),sessionId:'debug-session',runId:'run1',hypothesisId:'A'})}).catch(()=>{});
// #endregion
try {
const user = await account.create(ID.unique(), email, password, name)
await this.login(email, password)
return user
} catch (error) {
// #region agent log
fetch('http://127.0.0.1:7242/ingest/4fa7412d-6f79-4871-8728-29c37c9e5772',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({location:'appwrite.ts:23',message:'register error',data:{errorMessage:error instanceof Error ? error.message : 'Unknown error'},timestamp:Date.now(),sessionId:'debug-session',runId:'run1',hypothesisId:'A'})}).catch(()=>{});
// #endregion
throw error
}
},