기능구현중

This commit is contained in:
2026-01-11 17:01:01 +09:00
parent 375d5bf91a
commit 954ba21211
148 changed files with 2276 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import { requireAuth } from '../../../../utils/session'
import { syncProjectGitRepositories } from '../../../../utils/git-sync'
import { syncProjectSvnRepositories } from '../../../../utils/svn-sync'
/**
* 프로젝트 커밋 새로고침 (모든 저장소 동기화)
* POST /api/project/[id]/commits/refresh
*/
export default defineEventHandler(async (event) => {
await requireAuth(event)
const projectId = parseInt(getRouterParam(event, 'id') || '0')
if (!projectId) {
throw createError({ statusCode: 400, message: '프로젝트 ID가 필요합니다.' })
}
// Git과 SVN 모두 동기화
const gitResult = await syncProjectGitRepositories(projectId)
const svnResult = await syncProjectSvnRepositories(projectId)
const allResults = [...gitResult.results, ...svnResult.results]
const allSuccess = allResults.every(r => r.success)
return {
success: allSuccess,
message: allSuccess
? `${allResults.length}개 저장소 동기화 완료`
: '일부 저장소 동기화 실패',
results: allResults
}
})