Skip to content

Commit

Permalink
Make createServer sync
Browse files Browse the repository at this point in the history
  • Loading branch information
deptyped committed May 23, 2024
1 parent bc6e1b5 commit 37279f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function startPolling() {

async function startWebhook() {
const bot = createBot(config.BOT_TOKEN);
const server = await createServer(bot);
const server = createServer(bot);

let serverHandle: undefined | ReturnType<typeof serve>;
const startServer = () =>
Expand Down
2 changes: 1 addition & 1 deletion src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Variables = {
logger: Logger;
};

export const createServer = async (bot: Bot) => {
export const createServer = (bot: Bot) => {
const server = new Hono<{
Variables: Variables;
}>();
Expand Down

0 comments on commit 37279f7

Please sign in to comment.