mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-09 12:57:48 +00:00
chore: remove tabs
This commit is contained in:
@@ -26,34 +26,34 @@ import { PUBLIC_APPWRITE_ENDPOINT, PUBLIC_APPWRITE_PROJECT_ID } from '$env/stati
|
||||
export const SESSION_COOKIE = 'my-custom-session';
|
||||
|
||||
export function createAdminClient() {
|
||||
const client = new Client()
|
||||
.setEndpoint(PUBLIC_APPWRITE_ENDPOINT)
|
||||
.setProject(PUBLIC_APPWRITE_PROJECT_ID)
|
||||
.setKey(APPWRITE_KEY); // Set the Appwrite API key!
|
||||
const client = new Client()
|
||||
.setEndpoint(PUBLIC_APPWRITE_ENDPOINT)
|
||||
.setProject(PUBLIC_APPWRITE_PROJECT_ID)
|
||||
.setKey(APPWRITE_KEY); // Set the Appwrite API key!
|
||||
|
||||
// Return the services we want to use.
|
||||
return {
|
||||
get account() {
|
||||
return new Account(client);
|
||||
}
|
||||
};
|
||||
// Return the services we want to use.
|
||||
return {
|
||||
get account() {
|
||||
return new Account(client);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function createSessionClient(event) {
|
||||
const client = new Client()
|
||||
.setEndpoint(PUBLIC_APPWRITE_ENDPOINT)
|
||||
.setProject(PUBLIC_APPWRITE_PROJECT_ID);
|
||||
const client = new Client()
|
||||
.setEndpoint(PUBLIC_APPWRITE_ENDPOINT)
|
||||
.setProject(PUBLIC_APPWRITE_PROJECT_ID);
|
||||
|
||||
// Extract our custom domain's session cookie from the request
|
||||
const session = event.cookies.get(SESSION_COOKIE);
|
||||
if (session) client.setSession(session);
|
||||
// Extract our custom domain's session cookie from the request
|
||||
const session = event.cookies.get(SESSION_COOKIE);
|
||||
if (session) client.setSession(session);
|
||||
|
||||
// Return the services we want to use.
|
||||
return {
|
||||
get account() {
|
||||
return new Account(client);
|
||||
}
|
||||
};
|
||||
// Return the services we want to use.
|
||||
return {
|
||||
get account() {
|
||||
return new Account(client);
|
||||
}
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user