fix 3
This commit is contained in:
@@ -95,6 +95,15 @@ export async function getCustomerByAppwriteUserId(appwriteUserId) {
|
||||
return docs[0] || null
|
||||
}
|
||||
|
||||
export async function getCustomerByEmail(email) {
|
||||
if (!email) return null
|
||||
const docs = await listDocuments(config.collections.customers, [
|
||||
Query.equal('email', email.trim()),
|
||||
Query.limit(1),
|
||||
])
|
||||
return docs[0] || null
|
||||
}
|
||||
|
||||
export async function getPortalAccessByCustomerId(customerId) {
|
||||
const docs = await listDocuments(config.collections.customerPortalAccess, [
|
||||
Query.equal('customerId', customerId),
|
||||
@@ -133,7 +142,6 @@ export async function upsertWebsiteProjectByRepo(repoFullName, data) {
|
||||
})
|
||||
}
|
||||
|
||||
/** @deprecated Nur für Kompatibilität – nutzt native fetch */
|
||||
export function createAdminClient() {
|
||||
return { usesNativeFetch: true, databaseId: WOMS_DATABASE_ID }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user