Rechtliches: Appwrite-Setup-Skript und Konstanten

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-09-30 10:18:31 +00:00
1 parent 0105179e21
commit 1212173cb4
2 files changed
+187 -1

No files matched your search

+8 -1
View File
@@ -1,4 +1,4 @@
import { Client, Account, Databases, ID, Query } from 'appwrite'
import { Client, Account, Databases, Storage, ID, Query } from 'appwrite'
/** Ticket-System Appwrite-Projekt (Fallback wenn keine .env beim Build) */
const DEFAULT_PROJECT_ID = '6a1058610003c5a13a05'
@@ -23,6 +23,7 @@ const client = new Client().setEndpoint(endpoint).setProject(projectId)
export const account = new Account(client)
export const databases = new Databases(client)
export const storage = new Storage(client)
export const DATABASE_ID = import.meta.env.VITE_APPWRITE_DATABASE_ID || 'woms-database'
@@ -35,8 +36,14 @@ export const COLLECTIONS = {
LEADS: 'leads',
LEAD_SETTINGS: 'leadSettings',
LEAD_PIPELINE: 'leadPipeline',
LEGAL_DOCUMENTS: 'legalDocuments',
LEGAL_VERSIONS: 'legalVersions',
PROVIDER_CONTRACTS: 'providerContracts',
}
/** Dateien im Bereich Rechtliches (Versionen und Anbieter-Vertraege) */
export const LEGAL_BUCKET_ID = 'legal-files'
/** Prüft ob vermutlich eine Session existiert (cookieFallback oder Same-Origin-Cookie). */
export function hasAppwriteSession() {
if (typeof window === 'undefined' || !projectId) return false