mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-17 05:20:55 +00:00
Some checks are pending
Backend Unit Tests / Build packages (push) Waiting to run
Backend Unit Tests / Codegraph select (push) Waiting to run
Backend Unit Tests / TypeScript type checks (push) Blocked by required conditions
Backend Unit Tests / Circular dependency checks (push) Waiting to run
Backend Unit Tests / Tests: api (shard 1/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 2/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 3/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: data-provider (push) Blocked by required conditions
Backend Unit Tests / Tests: data-schemas (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 1/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 2/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 3/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 4/4) (push) Blocked by required conditions
Codegraph E2E Vote Gate / Gate (push) Waiting to run
Codegraph E2E Votes / vote (shard 1/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 10/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 2/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 3/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 4/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 5/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 6/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 7/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 8/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 9/10) (push) Waiting to run
Docker Dev Branch Images Build / publish (push) Waiting to run
Frontend Unit Tests / Client build recovery regression (push) Waiting to run
Frontend Unit Tests / Codegraph select (push) Waiting to run
Frontend Unit Tests / Build packages (push) Waiting to run
Frontend Unit Tests / TypeScript type checks (client) (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/chat (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/client (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 1/2) (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 2/2) (push) Blocked by required conditions
Frontend Unit Tests / Vite build verification (push) Blocked by required conditions
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Waiting to run
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Blocked by required conditions
* fix: restore strict tenant startup and sign-in * test: preserve real middleware in auth route fixtures --------- Co-authored-by: Lia <lia@librechat.ai>
74 lines
2 KiB
JavaScript
74 lines
2 KiB
JavaScript
const express = require('express');
|
|
const {
|
|
createUserPreferencesHandler,
|
|
preAuthTenantMiddleware,
|
|
requirePreAuthTenantContext,
|
|
} = require('@librechat/api');
|
|
const {
|
|
updateUserPluginsController,
|
|
resendVerificationController,
|
|
getTermsStatusController,
|
|
acceptTermsController,
|
|
verifyEmailController,
|
|
requestEmailChangeController,
|
|
confirmEmailChangeController,
|
|
deleteUserController,
|
|
getUserController,
|
|
} = require('~/server/controllers/UserController');
|
|
const {
|
|
verifyEmailLimiter,
|
|
emailChangeLimiter,
|
|
emailChangeSubmissionLimiter,
|
|
emailChangeSubmissionIpLimiter,
|
|
verifyEmailSubmissionLimiter,
|
|
configMiddleware,
|
|
strictConfigMiddleware,
|
|
canDeleteAccount,
|
|
requireJwtAuth,
|
|
} = require('~/server/middleware');
|
|
|
|
const settings = require('./settings');
|
|
const { updateUserStatefulCodeEnvironment } = require('~/models');
|
|
|
|
const router = express.Router();
|
|
|
|
const updateUserPreferences = createUserPreferencesHandler({
|
|
updateStatefulCodeEnvironment: updateUserStatefulCodeEnvironment,
|
|
});
|
|
|
|
router.use('/settings', settings);
|
|
router.get('/', requireJwtAuth, getUserController);
|
|
router.patch('/preferences', requireJwtAuth, configMiddleware, updateUserPreferences);
|
|
router.get('/terms', requireJwtAuth, getTermsStatusController);
|
|
router.post('/terms/accept', requireJwtAuth, acceptTermsController);
|
|
router.post('/plugins', requireJwtAuth, updateUserPluginsController);
|
|
router.delete('/delete', requireJwtAuth, canDeleteAccount, configMiddleware, deleteUserController);
|
|
router.post(
|
|
'/email/change',
|
|
requireJwtAuth,
|
|
emailChangeLimiter,
|
|
strictConfigMiddleware,
|
|
requestEmailChangeController,
|
|
);
|
|
router.post(
|
|
'/email/verify',
|
|
emailChangeSubmissionIpLimiter,
|
|
emailChangeSubmissionLimiter,
|
|
confirmEmailChangeController,
|
|
);
|
|
router.post(
|
|
'/verify',
|
|
preAuthTenantMiddleware,
|
|
requirePreAuthTenantContext,
|
|
verifyEmailSubmissionLimiter,
|
|
verifyEmailController,
|
|
);
|
|
router.post(
|
|
'/verify/resend',
|
|
preAuthTenantMiddleware,
|
|
requirePreAuthTenantContext,
|
|
verifyEmailLimiter,
|
|
resendVerificationController,
|
|
);
|
|
|
|
module.exports = router;
|