mirror of
https://github.com/directus/directus.git
synced 2026-02-01 11:14:55 -05:00
Run prettier
This commit is contained in:
@@ -19,7 +19,7 @@ type GetASTOptions = {
|
||||
accountability?: Accountability | null;
|
||||
action?: PermissionsAction;
|
||||
knex?: Knex;
|
||||
}
|
||||
};
|
||||
|
||||
export default async function getASTFromQuery(
|
||||
collection: string,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { Request } from "express";
|
||||
import { Request } from 'express';
|
||||
import url from 'url';
|
||||
|
||||
export function getCacheKey(req: Request) {
|
||||
const path = url.parse(req.originalUrl).pathname;
|
||||
const key = `${req.accountability?.user || 'null'}-${path}-${JSON.stringify(req.sanitizedQuery)}`;
|
||||
const key = `${req.accountability?.user || 'null'}-${path}-${JSON.stringify(
|
||||
req.sanitizedQuery
|
||||
)}`;
|
||||
return key;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ async function getEnvInfo(event: string) {
|
||||
store: env.CACHE_STORE,
|
||||
},
|
||||
storage: {
|
||||
drivers: getStorageDrivers()
|
||||
drivers: getStorageDrivers(),
|
||||
},
|
||||
cors: {
|
||||
enabled: env.CORS_ENABLED,
|
||||
@@ -57,15 +57,19 @@ async function getEnvInfo(event: string) {
|
||||
transport: env.EMAIL_TRANSPORT,
|
||||
},
|
||||
oauth: {
|
||||
providers: env.OAUTH_PROVIDERS.split(',').filter((p?: string) => p).map((p: string) => p.trim()),
|
||||
providers: env.OAUTH_PROVIDERS.split(',')
|
||||
.filter((p?: string) => p)
|
||||
.map((p: string) => p.trim()),
|
||||
},
|
||||
db_client: env.DB_CLIENT
|
||||
}
|
||||
db_client: env.DB_CLIENT,
|
||||
};
|
||||
}
|
||||
|
||||
function getStorageDrivers() {
|
||||
const drivers: string[] = [];
|
||||
const locations = env.STORAGE_LOCATIONS.split(',').filter((l?: string) => l).map((l: string) => l.trim());
|
||||
const locations = env.STORAGE_LOCATIONS.split(',')
|
||||
.filter((l?: string) => l)
|
||||
.map((l: string) => l.trim());
|
||||
|
||||
for (const location of locations) {
|
||||
const driver = env[`STORAGE_${location.toUpperCase()}_DRIVER`];
|
||||
|
||||
Reference in New Issue
Block a user