mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
Add fallback when no dev
This commit is contained in:
@ -3,6 +3,8 @@ import { GistsFile } from 'types';
|
||||
|
||||
const password = process.env.NEXT_PUBLIC_GITHUB_API;
|
||||
const host = process.env.NEXT_PUBLIC_GISTS_HOST ?? 'https://api.github.com';
|
||||
|
||||
if (!password) throw new Error('No GitHub token detected.')
|
||||
const octokit = new Octokit({
|
||||
auth: password,
|
||||
baseUrl: host,
|
||||
|
Reference in New Issue
Block a user