Merge branch 'feat-billing' of github.com:appwrite/console into feat-billing

This commit is contained in:
Damodar Lohani
2026-02-26 05:16:36 +00:00
2 changed files with 5 additions and 8 deletions
+4 -7
View File
@@ -4,13 +4,10 @@ const SECRET = env.PUBLIC_CONSOLE_FINGERPRINT_KEY ?? '';
const CACHE_TTL_MS = 60 * 60 * 1000; // 1 hour
async function sha256(message: string): Promise<string> {
if (!crypto?.subtle) return '';
const data = new TextEncoder().encode(message);
const hash = await crypto.subtle.digest('SHA-256', data);
return Array.from(new Uint8Array(hash))
.map((b) => b.toString(16).padStart(2, '0'))
.join('');
}
if (!crypto?.subtle) {
console.warn('crypto.subtle unavailable, fingerprinting disabled');
return '';
}
async function hmacSha256(message: string, secret: string): Promise<string> {
if (!crypto?.subtle) return '';
@@ -110,7 +110,7 @@ export const load: LayoutLoad = async ({ params, depends, parent }) => {
generateFingerprintToken()
.then((fingerprint) => {
sdk.forConsole.client.headers['X-Appwrite-Console-Fingerprint'] = fingerprint;
sdk.forConsole.projects.updateConsoleAccess({
return sdk.forConsole.projects.updateConsoleAccess({
projectId: params.project
});
})