Improve Tibi docs coverage and screenshot placement
This commit is contained in:
1 parent
7409bc2406
commit
15c1976c60
23 files changed
+417
-351
No files matched your search
@@ -43,7 +43,7 @@ function warn(msg) {
|
||||
console.error(`WARN: ${msg}`);
|
||||
}
|
||||
|
||||
/** 1. Routen: apiGroup.GET/POST/PUT/DELETE("pfad") + adm.* + OPTIONS aus setup.go, Duplikate raus. */
|
||||
/** 1. Routen: Controller-Routen aus setup.go plus System-CRUD/Meta-Routen aus dbapi/register.go. */
|
||||
function collectRoutes() {
|
||||
const file = path.join(SERVER_ROOT, "internal", "controller", "setup.go");
|
||||
if (!existsSync(file)) {
|
||||
@@ -60,6 +60,18 @@ function collectRoutes() {
|
||||
let m;
|
||||
while ((m = re.exec(src)) !== null) found.add(m[m.length - 1]);
|
||||
}
|
||||
|
||||
// RegisterModel erzeugt für diese Modelle GET/POST auf der Collection-Route
|
||||
// sowie GET/PUT/DELETE auf der :id-Route. AddMetaRoute erzeugt _meta und
|
||||
// eine /_meta/<modell>-Route je registriertem Modell. Diese Routen liegen
|
||||
// in dbapi/register.go und waren im bisherigen setup.go-only-Inventar weg.
|
||||
const models = ['user', 'project', 'org', 'team', 'token'];
|
||||
for (const model of models) {
|
||||
found.add(`/${model}`);
|
||||
found.add(`/${model}/:id`);
|
||||
}
|
||||
found.add('/_meta');
|
||||
for (const model of models) found.add(`/_meta/${model}`);
|
||||
return [...found].sort();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user