Skip to content

Commit e057828

Browse files
committed
npm run format
Signed-off-by: Harshvir Potpose <[email protected]>
1 parent fbda084 commit e057828

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

frontend/server/handlers/artifacts.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,9 @@ export function getArtifactsHandler({
101101
const source = useParameter ? req.params.source : req.query.source;
102102
const bucket = useParameter ? req.params.bucket : req.query.bucket;
103103
const key = useParameter ? req.params[0] : req.query.key;
104-
const {
105-
peek = 0,
106-
providerInfo = '',
107-
namespace: requestedNamespace,
108-
} = req.query as Partial<ArtifactsQueryStrings>;
104+
const { peek = 0, providerInfo = '', namespace: requestedNamespace } = req.query as Partial<
105+
ArtifactsQueryStrings
106+
>;
109107

110108
if (!source) {
111109
res.status(500).send('Storage source is missing from artifact request');
@@ -151,7 +149,9 @@ export function getArtifactsHandler({
151149
}
152150

153151
namespace = requestedNamespace;
154-
console.log(`Getting storage artifact at: ${source}: ${bucket}/${key} in namespace: ${namespace}`);
152+
console.log(
153+
`Getting storage artifact at: ${source}: ${bucket}/${key} in namespace: ${namespace}`,
154+
);
155155

156156
let client: MinioClient;
157157
switch (source) {
@@ -245,7 +245,9 @@ function getHttpArtifactsHandler(
245245
if (auth.key.length > 0) {
246246
// inject original request's value if exists, otherwise default to provided default value
247247
const headerValue = req.headers[auth.key] || req.headers[auth.key.toLowerCase()];
248-
headers[auth.key] = Array.isArray(headerValue) ? headerValue[0] : headerValue || auth.defaultValue;
248+
headers[auth.key] = Array.isArray(headerValue)
249+
? headerValue[0]
250+
: headerValue || auth.defaultValue;
249251
}
250252
if (!isAllowedDomain(url, allowedDomain)) {
251253
res.status(500).send(`Domain not allowed.`);
@@ -337,11 +339,11 @@ function getGCSArtifactHandler(
337339
// escapes everything else.
338340
const regex = new RegExp(
339341
'^' +
340-
key
341-
.split(/\*+/)
342-
.map(escapeRegexChars)
343-
.join('.*') +
344-
'$',
342+
key
343+
.split(/\*+/)
344+
.map(escapeRegexChars)
345+
.join('.*') +
346+
'$',
345347
);
346348
return regex.test(f.name);
347349
});

0 commit comments

Comments
 (0)