Archiv/Rechte: Review-Punkte
- archiviertes Projekt bleibt unter Funktionen sichtbar, solange dort eine Funktion bestellt/eingerichtet/aktiv ist (z. B. Terminbuchungen) - auf archivierten Projekten nichts neu bestellen oder einschalten - Projekttyp Vorlage nur fuer Admins; repo-readme nur fuer bekannte Projekte Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3156bb790a
commit
4fc4c70b7d
5 files changed
+52
-6
No files matched your search
@@ -1,4 +1,6 @@
|
||||
import { Router } from 'express'
|
||||
import { config } from '../../config.js'
|
||||
import { listDocuments, Query } from '../../services/appwriteAdmin.js'
|
||||
import { syncReposToAppwrite, fetchRepoReadme, importNewRepos } from '../../services/giteaAdmin.js'
|
||||
import { requireAppwriteTeam } from '../../middleware/appwriteStaff.js'
|
||||
|
||||
@@ -36,6 +38,12 @@ router.get('/repo-readme', async (req, res) => {
|
||||
}
|
||||
|
||||
try {
|
||||
// Nur Repos, die ein Projekt sind - der System-Schluessel sieht sonst jedes (auch private) Repo
|
||||
const known = await listDocuments(config.collections.websiteProjects, [
|
||||
Query.equal('repoFullName', repoFullName),
|
||||
Query.limit(1),
|
||||
])
|
||||
if (!known[0]) return res.status(404).json({ error: 'Projekt nicht gefunden' })
|
||||
const readme = await fetchRepoReadme(repoFullName)
|
||||
if (!readme) {
|
||||
return res.json({ ok: true, found: false, repoFullName })
|
||||
|
||||
Reference in new issue
Block a user