Appwrite Fix 1.
Hopefully i can create accounts
This commit is contained in:
9
client/.env.production
Normal file
9
client/.env.production
Normal 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
|
||||
@@ -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
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user