refactor(core): Move frontend settings to @n8n/api-types (no-changelog) (#10856)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-09-17 17:21:11 +02:00
committed by GitHub
parent 3c15890a5b
commit 430c14ad19
24 changed files with 223 additions and 235 deletions

View File

@@ -1,10 +1,10 @@
import type { FrontendSettings } from '@n8n/api-types';
import { exec as callbackExec } from 'child_process';
import cookieParser from 'cookie-parser';
import express from 'express';
import { access as fsAccess } from 'fs/promises';
import helmet from 'helmet';
import { InstanceSettings } from 'n8n-core';
import type { IN8nUISettings } from 'n8n-workflow';
import { resolve } from 'path';
import { Container, Service } from 'typedi';
import { promisify } from 'util';
@@ -252,7 +252,7 @@ export class Server extends AbstractServer {
this.app.get(
`/${this.restEndpoint}/settings`,
ResponseHelper.send(
async (req: express.Request): Promise<IN8nUISettings> =>
async (req: express.Request): Promise<FrontendSettings> =>
frontendService.getSettings(req.headers['push-ref'] as string),
),
);