Skip to content

Commit

Permalink
Untitled commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kishore03109 committed Dec 6, 2023
1 parent 437d36c commit c0c5439
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/services/db/GitHubService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export default class GitHubService {

async readMedia(
sessionData: UserWithSiteSessionData,
{ fileSha }: { fileSha: any; branchName?: string }
{ fileSha }: { fileSha: string }
) {
/**
* Files that are bigger than 1 MB needs to be retrieved
Expand Down Expand Up @@ -268,7 +268,7 @@ export default class GitHubService {

async readDirectory(
sessionData: UserWithSiteSessionData,
{ directoryName }: { directoryName: any }
{ directoryName }: { directoryName: string }
) {
const { accessToken } = sessionData
const { siteName } = sessionData
Expand Down Expand Up @@ -514,16 +514,15 @@ export default class GitHubService {
async getTree(
sessionData: UserWithSiteSessionData,
githubSessionData: GithubSessionData,
{ isRecursive }: any,
isStaging = true
{ isRecursive }: any
): Promise<RawGitTreeEntry[]> {
const { accessToken } = sessionData
const { siteName } = sessionData
const { treeSha } = githubSessionData.getGithubState()
const url = `${siteName}/git/trees/${treeSha}`

const params = {
ref: isStaging ? STAGING_BRANCH : STAGING_LITE_BRANCH,
ref: STAGING_BRANCH,
recursive: false,
}

Expand Down
4 changes: 2 additions & 2 deletions src/services/db/RepoService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ export default class RepoService extends GitHubService {

dirContent = result.value
} else {
dirContent = (await super.readDirectory(sessionData, {
dirContent = await super.readDirectory(sessionData, {
directoryName,
})) as GitDirectoryItem[]
})
}

const { directories, files, total } = getPaginatedDirectoryContents(
Expand Down

0 comments on commit c0c5439

Please sign in to comment.