Skip to content

Commit

Permalink
Fix repo clone token bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hiveer committed Sep 26, 2024
1 parent cd98a1f commit 9efea4f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions frontend/src/components/shared/RepoClone.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{{ syncInprogress ? $t("repo.source.syncing") : $t("repo.source.syncButton") }}
</el-button>


<!-- endpoint deploy button -->
<DeployDropdown
v-if="isLoggedIn && repoType === 'model' && enableEndpoint && !!httpCloneUrl"
Expand Down Expand Up @@ -173,7 +173,7 @@
import useFetchApi from '../../packs/useFetchApi'
import { ElMessage } from "element-plus"
import AddToCollections from '../collections/AddToCollections.vue'
const { cookies } = useCookies()
const props = defineProps({
Expand Down Expand Up @@ -330,7 +330,6 @@ result = snapshot_download(repo_id, cache_dir=cache_dir, endpoint=endpoint, toke
const fetchUserToken = async() => {
if (!currentUser.value) return
if (!props.userName) return
const { data } = await useFetchApi(
`/user/${currentUser.value}/tokens?app=git`
Expand All @@ -343,7 +342,7 @@ result = snapshot_download(repo_id, cache_dir=cache_dir, endpoint=endpoint, toke
}
}
watch(() => cloneRepositoryVisible.value, () => {
watch(cloneRepositoryVisible, () => {
if (cloneRepositoryVisible.value && !accessToken.value) {
fetchUserToken()
}
Expand Down

0 comments on commit 9efea4f

Please sign in to comment.