add a method to cache all files when necessary
This commit is contained in:
@@ -2,7 +2,7 @@ import { computed, Ref, ref, toValue } from 'vue'
|
||||
|
||||
import { useMarkdown } from '@/hooks/useMarkdown.hook'
|
||||
import { prepareNoteCache } from '@/modules/note/cache/prepareNoteCache'
|
||||
import { getFileContent } from '@/modules/repo/services/repo'
|
||||
import { queryFileContent } from '@/modules/repo/services/repo'
|
||||
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
|
||||
|
||||
export const useFile = (sha: Ref<string> | string, retrieveContent = true) => {
|
||||
@@ -48,7 +48,7 @@ export const useFile = (sha: Ref<string> | string, retrieveContent = true) => {
|
||||
return cachedNote.content
|
||||
}
|
||||
|
||||
const contentFile = await getFileContent(
|
||||
const contentFile = await queryFileContent(
|
||||
store.user,
|
||||
store.repo,
|
||||
toValue(sha)
|
||||
|
||||
Reference in New Issue
Block a user