UNPKG

ttbkk-mcp-server

Version:

MCP server providing access to Korean tteokbokki restaurant database with search, location-based queries, and brand information

41 lines 1.26 kB
import { supabase } from '../lib/supabase.js'; /** * Get detailed information about a specific restaurant (실제 ttbkk-web usePlaceDetail 기반) * @param restaurantId - Unique identifier of the restaurant * @returns Detailed restaurant information */ export async function getRestaurantDetails(restaurantId) { try { // ttbkk-web usePlaceDetail과 동일한 구조로 조회 const { data, error } = await supabase .from('place') .select(` *, brand ( *, hashtags:brand_hashtags!brand_id ( hashtag_id ) ), hashtags:place_hashtags!place_id ( hashtag_id ) `) .eq('id', restaurantId) .eq('is_deleted', false) .single(); if (error) { console.error('Supabase error:', error); throw new Error(`Failed to get restaurant details: ${error.message}`); } if (!data) { throw new Error(`Restaurant with ID ${restaurantId} not found`); } return data; } catch (error) { console.error('Error getting restaurant details:', error); throw error; } } //# sourceMappingURL=restaurant-details.js.map