Implementiere Kundenportal mit zentraler Appwrite-Anbindung.

Express-Server für Appwrite-Auth, Session, Projekt-Dashboard und Gitea-Webhook; statisches Frontend und Schema-Dokumentation für woms-database.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-22 23:38:38 +02:00
commit f31727aeb4
23 changed files with 2056 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import { createUserClient } from './appwriteAdmin.js'
export async function loginWithAppwrite(email, password) {
const { client, account } = createUserClient()
try {
await account.createEmailPasswordSession(email, password)
} catch (err) {
const message = err?.message || 'Anmeldung fehlgeschlagen'
const error = new Error(message)
error.status = 401
throw error
}
const user = await account.get()
try {
await account.deleteSession('current')
} catch {
// Portal nutzt eigene Session; Appwrite-Session wird nicht persistiert
}
return user
}