mirror of
https://github.com/usememos/memos.git
synced 2024-12-22 02:31:46 +03:00
fix: remove axios withCredentials
This commit is contained in:
parent
0dc377550f
commit
9c842d0a40
@ -1,7 +1,5 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
axios.defaults.withCredentials = true;
|
|
||||||
|
|
||||||
type ResponseObject<T> = {
|
type ResponseObject<T> = {
|
||||||
data: T;
|
data: T;
|
||||||
error?: string;
|
error?: string;
|
||||||
@ -120,12 +118,11 @@ export function getTagList(tagFind?: TagFind) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function getRepoStarCount() {
|
export async function getRepoStarCount() {
|
||||||
const data = (
|
const { data } = await axios.get(`https://api.github.com/repos/usememos/memos`, {
|
||||||
await axios.get("https://api.github.com/repos/usememos/memos", {
|
headers: {
|
||||||
headers: {
|
Accept: "application/vnd.github.v3.star+json",
|
||||||
accept: "application/vnd.github+json",
|
Authorization: "",
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
).data;
|
|
||||||
return data.stargazers_count as number;
|
return data.stargazers_count as number;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user