feat: 저장소 소유자(조직)를 백엔드 설정값으로 표시

생성 폼/목록의 하드코딩된 'marketing-team' 을 실제 설정값으로 교체한다.
- 백엔드: GET /repos/owner ({ owner }) — GITEA_ORG(미연동 시 기본 상수) 반환
- 프론트: useRepo.owner() + repo.store owner/fetchOwner(캐시)
- RepoCreatePage 소유자 고정 표시, RepoListPage 배너를 실제 조직명으로

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-16 23:53:39 +09:00
parent efe7b29581
commit 6652e79768
6 changed files with 58 additions and 7 deletions
@@ -47,6 +47,14 @@ export class RepoController {
return this.repoService.create(dto, user.id);
}
// ':repoId' 보다 먼저 선언해야 'owner' 가 파라미터로 매칭되지 않음
@Get('owner')
@ApiOperation({ summary: '현재 조직(소유자) 조회 — 생성 폼 표시용' })
@ApiResponse({ status: 200, description: '조회 성공' })
getOwner(): { owner: string } {
return { owner: this.repoService.getOwner() };
}
@Get(':repoId')
@ApiOperation({ summary: '저장소 단건 조회' })
@ApiResponse({ status: 200, description: '조회 성공' })
+6
View File
@@ -57,6 +57,12 @@ export class RepoService {
private readonly gitea: GiteaService,
) {}
// 현재 저장소 소유자(조직) — Gitea 연동 시 GITEA_ORG, 아니면 기본 상수.
// 프론트 생성 폼의 "소유자 고정" 표시에 사용(저장소 생성 전 미리 노출).
getOwner(): string {
return this.gitea.enabled ? this.gitea.org : DEFAULT_OWNER;
}
// 내가 멤버인 저장소 목록
async findAllForUser(userId: string): Promise<RepoResponse[]> {
const memberships = await this.memberRepo.find({