mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-26 18:38:39 -06:00
feat: link preview and hide manager
This commit is contained in:
parent
f0b93534d9
commit
18d52a7d99
@ -3,7 +3,13 @@ import { readFileSync } from 'fs';
|
||||
import { load } from 'js-yaml';
|
||||
import { join } from 'path';
|
||||
|
||||
export type HttpServer = { TYPE: 'http' | 'https'; PORT: number; URL: string; HIDE_INDEX: boolean };
|
||||
export type HttpServer = {
|
||||
TYPE: 'http' | 'https';
|
||||
PORT: number;
|
||||
URL: string;
|
||||
HIDE_INDEX: boolean;
|
||||
HIDE_MANAGER: boolean;
|
||||
};
|
||||
|
||||
export type HttpMethods = 'POST' | 'GET' | 'PUT' | 'DELETE';
|
||||
export type Cors = {
|
||||
@ -179,6 +185,7 @@ export class ConfigService {
|
||||
PORT: Number.parseInt(process.env.SERVER_PORT) || 8080,
|
||||
URL: process.env.SERVER_URL,
|
||||
HIDE_INDEX: process.env?.SERVER_HIDE_INDEX === 'true',
|
||||
HIDE_MANAGER: process.env?.SERVER_HIDE_MANAGER === 'true',
|
||||
},
|
||||
CORS: {
|
||||
ORIGIN: process.env.CORS_ORIGIN.split(',') || ['*'],
|
||||
|
@ -43,9 +43,9 @@ if (!httpServer.HIDE_INDEX)
|
||||
version: packageJson.version,
|
||||
});
|
||||
});
|
||||
if (!httpServer.HIDE_MANAGER) router.use('/manager', new ViewsRouter().router);
|
||||
router
|
||||
.use('/instance', new InstanceRouter(configService, ...guards).router)
|
||||
.use('/manager', new ViewsRouter().router)
|
||||
.use('/message', new MessageRouter(...guards).router)
|
||||
.use('/chat', new ChatRouter(...guards).router)
|
||||
.use('/group', new GroupRouter(...guards).router)
|
||||
|
@ -1984,7 +1984,7 @@ export class WAStartupService {
|
||||
this.logger.verbose('Sending presence update: paused');
|
||||
}
|
||||
|
||||
const linkPreview = options?.linkPreview != false ? undefined : false;
|
||||
const linkPreview = options?.linkPreview == true ? undefined : options?.linkPreview || false;
|
||||
|
||||
let quoted: WAMessage;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user