Align shop and inventory data with database schema changes
Update shop GET endpoint to filter by `enabled` instead of `available`. Correct user inventory query to select `item_data` from `shop_items` table, replacing the deprecated `value` column. Replit-Commit-Author: Agent Replit-Commit-Session-Id: aed2e46d-25bb-4b73-81a1-bb9e8437c261 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 411c419b-dfbc-456d-b53c-0a81a700fbda Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3bdfff67-975a-46ad-9845-fbb6b4a4c4b5/aed2e46d-25bb-4b73-81a1-bb9e8437c261/oWFvNCu Replit-Helium-Checkpoint-Created: true
This commit is contained in:
parent
4e9873d76a
commit
50645175da
1 changed files with 2 additions and 2 deletions
|
|
@ -359,7 +359,7 @@ function createWebServer(discordClient, supabase, options = {}) {
|
|||
.from('shop_items')
|
||||
.select('*')
|
||||
.eq('guild_id', guildId)
|
||||
.eq('available', true)
|
||||
.eq('enabled', true)
|
||||
.order('price', { ascending: true });
|
||||
|
||||
res.json({ items: items || [] });
|
||||
|
|
@ -395,7 +395,7 @@ function createWebServer(discordClient, supabase, options = {}) {
|
|||
.from('user_inventory')
|
||||
.select(`
|
||||
*,
|
||||
shop_items (name, description, item_type, value)
|
||||
shop_items (name, description, item_type, item_data)
|
||||
`)
|
||||
.eq('user_id', link.user_id)
|
||||
.eq('guild_id', guildId);
|
||||
|
|
|
|||
Loading…
Reference in a new issue