Skip to content

Commit c3f17a0

Browse files
committed
small refactoring
1 parent 2c20353 commit c3f17a0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/fastify.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const fastifyDevConstructor = (opts?: Parameters<typeof fastifyConstructo
2121
* Maybe because of not handling the generics of fastifyConstructor
2222
*/
2323

24-
const fastify = fastifyConstructor(Object.assign({}, { logger: true }, opts));
24+
const fastify = fastifyConstructor({ logger: true , ...opts });
2525

2626
/**
2727
* デフォルトのエラーハンドラはエラーをログに出力して握り潰すため,

welcome/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ import logger from '../lib/logger.js';
66
import {Page} from '../lib/scrapbox';
77
import type {SlackInterface} from '../lib/slack';
88

9-
const welcomePageTitleLc = 'welcome';
10-
119
async function postWelcomeMessage(slack: WebClient, channel: string) {
12-
const welcomePage = new Page({ titleLc: welcomePageTitleLc, isEncoded: false });
10+
const welcomePage = new Page({ titleLc: 'welcome', isEncoded: false });
1311
const text = (await welcomePage.fetchInfo()).lines.map(({text}: {text: string}) => text).slice(1).join('\n');
1412

1513
return slack.chat.postMessage({

0 commit comments

Comments
 (0)