Github access test

This commit is contained in:
2025-12-28 22:42:27 +01:00
parent 568d894061
commit 24e37e5244
2 changed files with 39 additions and 6 deletions
+26
View File
@@ -19,6 +19,9 @@ import Link from "next/link";
import { getLiveNodes } from "@/core/node";
import { useEffect, useState } from "react";
import { Node, NodeLiveData } from "@/lib/types";
import axios from "axios";
import Cookies from "js-cookie";
import { getSession } from "@/core/auth/session";
const recentDeployments = [
{
@@ -99,6 +102,29 @@ export default function OverviewPage() {
};
fetchNodes();
const interval = setInterval(fetchNodes, 3000);
const test = async () => {
const sessionToken = await getSession();
console.log(sessionToken);
// console.log(
// (
// await axios.get("https://api.github.com/user/repos", {
// headers: { Authorization: `Bearer ${sessionToken}` },
// })
// ).data
// );
// console.log(
// (
// await axios.get("https://api.github.com/orgs/orus-dev/repos", {
// headers: { Authorization: `Bearer ${sessionToken}` },
// })
// ).data
// );
};
test();
return () => clearInterval(interval);
}, []);