Feature/drupalwiki collector (#3693)

* Implement DrupalWiki collector

* Add attachment downloading and processing functionality (#3)

* linting

* Linting
Add citation image
small refactors
add URL for citation identifier

---------

Co-authored-by: em <eugen.mayer@kontextwork.de>
Co-authored-by: rexjohannes <53578137+rexjohannes@users.noreply.github.com>
Co-authored-by: Eugen Mayer <136934+EugenMayer@users.noreply.github.com>
This commit is contained in:
Timothy Carambat
2025-04-21 09:17:24 -07:00
committed by GitHub
parent fe59e22397
commit fd4929b4d2
15 changed files with 782 additions and 12 deletions

View File

@@ -127,6 +127,27 @@ function extensionEndpoints(app) {
}
}
);
app.post(
"/ext/drupalwiki",
[validatedRequest, flexUserRoleValid([ROLES.admin, ROLES.manager])],
async (request, response) => {
try {
const responseFromProcessor =
await new CollectorApi().forwardExtensionRequest({
endpoint: "/ext/drupalwiki",
method: "POST",
body: request.body,
});
await Telemetry.sendTelemetry("extension_invoked", {
type: "drupalwiki",
});
response.status(200).json(responseFromProcessor);
} catch (e) {
console.error(e);
response.sendStatus(500).end();
}
}
);
}
module.exports = { extensionEndpoints };