This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gh_pr() { | |
local base_branch=${1:-dev} | |
local head_branch=$2 | |
if [ -z "$head_branch" ]; then | |
head_branch=$(git rev-parse --abbrev-ref HEAD) | |
fi | |
if gh pr create -f --base "$base_branch" --head "$head_branch"; then | |
echo "Pull so'rovi yaratildi" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from "axios"; | |
import {getCsrfToken, getSession, signOut} from "next-auth/react"; | |
const refreshToken = async (token) => { | |
const response = await fetch(`${process.env.API_URL}/auth/refresh`, { | |
method: 'POST', | |
headers: { | |
'Authorization': `Bearer ${token}`, | |
'Content-Type': 'application/json' | |
} |