Fix: indents
All checks were successful
release-tag / release-image (push) Successful in 1m52s
release-tag / deploy (push) Successful in 46s

This commit is contained in:
2024-10-15 12:54:24 +00:00
parent 31cad1046e
commit d60bea2279
2 changed files with 10 additions and 10 deletions

View File

@@ -10,8 +10,8 @@ async function loadPages(): Promise<void> {
try { try {
const pagesPath = path.join(__dirname, './pages'); const pagesPath = path.join(__dirname, './pages');
const pagesFiles = path.basename(__filename).endsWith('.ts') const pagesFiles = path.basename(__filename).endsWith('.ts')
? (await readdir(pagesPath)).filter(file => file.endsWith('.ts')) ? (await readdir(pagesPath)).filter(file => file.endsWith('.ts'))
: (await readdir(pagesPath)).filter(file => file.endsWith('.js')); : (await readdir(pagesPath)).filter(file => file.endsWith('.js'));
for (const file of pagesFiles) { for (const file of pagesFiles) {
const filePath = path.join(pagesPath, file); const filePath = path.join(pagesPath, file);
const data = await import(filePath); const data = await import(filePath);

View File

@@ -29,14 +29,14 @@ class Repo extends Page{
res.set({ res.set({
'Content-Type': 'application/octet-stream' 'Content-Type': 'application/octet-stream'
}); });
await new Promise<void>((resolve, reject) => { await new Promise<void>((resolve, reject) => {
fileStream.pipe(res); fileStream.pipe(res);
fileStream.on('end', () => { fileStream.on('end', () => {
console.log(`Response with ${file}`); console.log(`Response with ${file}`);
resolve(); resolve();
}); });
}); });
} catch(err: unknown) { } catch(err: unknown) {
if (err instanceof URIError) { if (err instanceof URIError) {
res.status(404).send(String(err)); res.status(404).send(String(err));
return; return;