refactor: consolidate upload helpers
This commit is contained in:
@@ -3,6 +3,7 @@ import { validateUploadSecret } from '@/lib/auth'
|
||||
import { getRemoteFolder, pushAllToGitHub } from '@/lib/github'
|
||||
import { buildCommitMessage } from '@/lib/commit-message'
|
||||
import { classifyFileChanges } from '@/lib/diff-files'
|
||||
import { getModelFolderPath } from '@/lib/model-paths'
|
||||
import { cleanupStagingUpload, ensurePreparedStagingAssets, readStagedManifest } from '@/lib/upload-staging'
|
||||
import { acquireUploadLock, releaseUploadLock } from '@/lib/upload-lock'
|
||||
|
||||
@@ -52,7 +53,7 @@ export async function POST(req: NextRequest) {
|
||||
} = await ensurePreparedStagingAssets(stagingId)
|
||||
|
||||
// --- Detect existing files and classify changes ---
|
||||
const folderPath = `public/models/${folderName}`
|
||||
const folderPath = getModelFolderPath(folderName)
|
||||
let remoteFileMap: Map<string, number>
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user