Files
desa-darmasaba/src/lib/seafile-auth-service.ts
nico 25000d0b0f PPID > Profile PPID
Desa >  Profile Visi Misi Desa
Keamanan >  Pencegahan Kriminalitas  Grid Kiri  Datanya  Mepet
Keamanan >  Laporan  Publik
Ekonomi  >  Sektor Unggulan Desa Coba tampilin 3  Aja
2026-02-04 16:59:49 +08:00

17 lines
551 B
TypeScript

// Function to get the static authentication token from environment variables
export async function getValidAuthToken(): Promise<string> {
const staticToken = process.env.SEAFILE_TOKEN;
if (!staticToken) {
throw new Error('SEAFILE_TOKEN environment variable is not set');
}
console.log("Using static SEAFILE_TOKEN from environment variables");
return staticToken;
}
// Function to check if the token is set (always true since we're using static token)
export function isTokenValid(): boolean {
return !!process.env.SEAFILE_TOKEN;
}