Skip to content

Commit c376b95

Browse files
committed
replace firebase function with github api for version check
1 parent 1673adf commit c376b95

File tree

1 file changed

+6
-6
lines changed
  • ui/src/Components/DashBoard/Help

1 file changed

+6
-6
lines changed

ui/src/Components/DashBoard/Help/Help.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,25 @@ export default function Help() {
7474
setShowUpdatePane(true);
7575
setLoading(true);
7676

77-
const firebaseEndpoint =
78-
"https://us-central1-gitconvex.cloudfunctions.net/gitconvexVersion";
77+
const githubEndpoint =
78+
"https://api.github.com/repos/neel1996/gitconvex/releases/latest";
7979

8080
axios({
81-
url: firebaseEndpoint,
81+
url: githubEndpoint,
8282
method: "GET",
8383
headers: {
8484
Accept: "application/json",
8585
},
8686
})
8787
.then((res) => {
88-
const { version } = res.data;
88+
const { tag_name } = res.data;
8989
setLoading(false);
9090

91-
if (currentVersion === version) {
91+
if (currentVersion === tag_name) {
9292
setIsLatest(true);
9393
setAvailableUpdate("");
9494
} else {
95-
setAvailableUpdate(version);
95+
setAvailableUpdate(tag_name);
9696
}
9797
})
9898
.catch((err) => {

0 commit comments

Comments
 (0)