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:
@@ -9,6 +9,12 @@ export function useRepo() {
|
||||
return (await api.get('/repos')) as unknown as ApiRepo[]
|
||||
}
|
||||
|
||||
// 현재 조직(소유자) — 생성 폼의 "소유자 고정" 표시용
|
||||
async function owner(): Promise<string> {
|
||||
const res = (await api.get('/repos/owner')) as unknown as { owner: string }
|
||||
return res.owner
|
||||
}
|
||||
|
||||
async function get(id: string): Promise<ApiRepo> {
|
||||
return (await api.get(`/repos/${id}`)) as unknown as ApiRepo
|
||||
}
|
||||
@@ -25,5 +31,5 @@ export function useRepo() {
|
||||
await api.delete(`/repos/${id}`)
|
||||
}
|
||||
|
||||
return { list, get, create, update, remove }
|
||||
return { list, owner, get, create, update, remove }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user