Skip to content

Commit

Permalink
Test fetch running deno with ignore cert errors flag
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCogley committed Dec 9, 2024
1 parent 034dfda commit 111b235
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"lume/": "https://deno.land/x/[email protected]/"
},
"tasks": {
"lume": "echo \"import 'lume/cli.ts'\" | deno run --env-file -A -",
"lume": "echo \"import 'lume/cli.ts'\" | deno run --unsafely-ignore-certificate-errors --env-file -A -",
"build": "deno task lume",
"serve": "deno task lume -s",
"format": "echo '=== Regular deno fmt... ===' && deno fmt --ignore=_dist && echo '=== Deno fmt for vento... ===' && deno fmt --unstable-component --ignore=_dist"
Expand Down
13 changes: 13 additions & 0 deletions src/_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,21 @@ const response = await fetch("https://webhook.site/esolia-holidays", {
const holidays = await response.json();
export { holidays };

// Fetch holidays with bearer token
const response2 = await fetch("https://pro.dbflex.net/secure/api/v2/15331/Work%20Holiday/API%20Holidays%20Today%20or%20Later/select.json", {
method: "GET",
mode: "no-cors",
headers: {
"Accept": "application/json",
"Authorization": "Bearer " + Deno.env.get("API_KEY_01"),
},
});
const holidays2 = await response2.json();
export { holidays2 };

// Get repo folder size
import { join } from "https://deno.land/std/path/mod.ts";
import { ModuleEngine } from "lume/plugins/modules.ts";
async function getFolderSize(path: string): Promise<number> {
let totalSize = 0;

Expand Down

0 comments on commit 111b235

Please sign in to comment.