mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-11 01:10:11 +01:00
1c473621aa
* add user management endpoints to list all users via developer api * rename users to user management in swagger docs * linting --------- Co-authored-by: timothycarambat <rambat1010@gmail.com>
24 lines
876 B
JavaScript
24 lines
876 B
JavaScript
const { useSwagger } = require("../../swagger/utils");
|
|
const { apiAdminEndpoints } = require("./admin");
|
|
const { apiAuthEndpoints } = require("./auth");
|
|
const { apiDocumentEndpoints } = require("./document");
|
|
const { apiSystemEndpoints } = require("./system");
|
|
const { apiWorkspaceEndpoints } = require("./workspace");
|
|
const { apiUserManagementEndpoints } = require("./userManagement");
|
|
|
|
// All endpoints must be documented and pass through the validApiKey Middleware.
|
|
// How to JSDoc an endpoint
|
|
// https://www.npmjs.com/package/swagger-autogen#openapi-3x
|
|
function developerEndpoints(app, router) {
|
|
if (!router) return;
|
|
useSwagger(app);
|
|
apiAuthEndpoints(router);
|
|
apiAdminEndpoints(router);
|
|
apiSystemEndpoints(router);
|
|
apiWorkspaceEndpoints(router);
|
|
apiDocumentEndpoints(router);
|
|
apiUserManagementEndpoints(router);
|
|
}
|
|
|
|
module.exports = { developerEndpoints };
|