mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
20 lines
557 B
JavaScript
20 lines
557 B
JavaScript
|
|
const express = require('express');
|
||
|
|
const EditController = require('~/server/controllers/EditController');
|
||
|
|
const { initializeClient } = require('~/server/services/Endpoints/google');
|
||
|
|
const {
|
||
|
|
setHeaders,
|
||
|
|
handleAbort,
|
||
|
|
validateEndpoint,
|
||
|
|
buildEndpointOption,
|
||
|
|
} = require('~/server/middleware');
|
||
|
|
|
||
|
|
const router = express.Router();
|
||
|
|
|
||
|
|
router.post('/abort', handleAbort());
|
||
|
|
|
||
|
|
router.post('/', validateEndpoint, buildEndpointOption, setHeaders, async (req, res, next) => {
|
||
|
|
await EditController(req, res, next, initializeClient);
|
||
|
|
});
|
||
|
|
|
||
|
|
module.exports = router;
|