diff --git a/lib/api.ts b/lib/api.ts index 4bba90f7..987ad888 100644 --- a/lib/api.ts +++ b/lib/api.ts @@ -387,7 +387,7 @@ export class Api extends EventEmitter { } public async getMenu(child: EtjanstChild): Promise { - if (this.isFake) return fakeResponse(fake.menu(child)) + if (this.isFake) return fakeResponse(fake.menu(child).map(parse.menuItem)) const menuService = await this.getMenuChoice(child) if (menuService === 'rss') { diff --git a/lib/parse/menu.ts b/lib/parse/menu.ts index ab03ef2f..5872a6c8 100644 --- a/lib/parse/menu.ts +++ b/lib/parse/menu.ts @@ -18,34 +18,29 @@ export const menuList = (data: any): MenuItem[] => { ) if (!currentWeek) { - return [ - { - title: 'Måndag - Vecka ?', - description: 'Hittade ingen meny', - }, - ] + return [] } const menuItemsFS = [ { title: `Måndag - Vecka ${currentWeek.week}`, - description: currentWeek.mon, + description: toMarkdown(currentWeek.mon) , }, { title: `Tisdag - Vecka ${currentWeek.week}`, - description: currentWeek.tue, + description: toMarkdown(currentWeek.tue), }, { title: `Onsdag - Vecka ${currentWeek.week}`, - description: currentWeek.wed, + description: toMarkdown(currentWeek.wed), }, { title: `Torsdag - Vecka ${currentWeek.week}`, - description: currentWeek.thu, + description: toMarkdown(currentWeek.thu), }, { title: `Fredag - Vecka ${currentWeek.week}`, - description: currentWeek.fri, + description: toMarkdown(currentWeek.fri), }, ]