/** PUT /api/accounting/amazon-ads/profile { profileId, label } — choose the advertising profile (marketplace) to bill from. */ import { setAdsSetting } from '../../../utils/amazonAds/adsStore' export default defineEventHandler(async (event) => { const body = await readBody(event) const profileId = String(body?.profileId || '').trim() if (!profileId) { setAdsSetting('profile_id', null); setAdsSetting('profile_label', null); return { status: 200 } } setAdsSetting('profile_id', profileId) setAdsSetting('profile_label', body?.label ? String(body.label) : null) return { status: 200, profileId } })