PageSourceSearch

https://restaurantreview.ai/assets/locatieOntkoppelen-BDuPYKOr.js

js restaurantreview.ai collected 2026-10-05 14:08:31 UTC 2,398 bytes, 1 lines download raw bytes

1import{E as c}from"./index-CNRp9eia.js";const u={maxRetries:3,initialDelayMs:1e3,maxDelayMs:1e4,shouldRetry:i=>{if(i instanceof c)return i.status===401||i.status===403||i.status===429?!1:i.status===0||i.status>=500;if(i instanceof Error){const e=i.message.toLowerCase();if(e.includes("401")||e.includes("403")||e.includes("niet geauthenticeerd")||e.includes("not authenticated")||e.includes("provider_token")||e.includes("log opnieuw in")||e.includes("429")||e.includes("rate limit"))return!1;if(e.includes("timeout")||e.includes("network")||e.includes("500")||e.includes("502")||e.includes("503")||e.includes("504"))return!0}return!1}};function d(i){return new Promise(e=>setTimeout(e,i))}async function w(i,e={}){const t={...u,...e};let l;for(let o=0;o<=t.maxRetries;o++)try{return await i()}catch(a){if(l=a,o>=t.maxRetries||!t.shouldRetry(a,o))throw a;const s=Math.min(t.initialDelayMs*Math.pow(2,o),t.maxDelayMs);await d(s)}throw l}const _={google:"location_id, location_name, account_id",tripadvisor:"location_id, location_name, web_url"};function m(i,e){return i==="google"?{google_location_id:e?.location_id||null,google_location_name:e?.location_name||null,google_location_account:e?.account_id||null}:{tripadvisor_location_id:e?.location_id||null,tripadvisor_location_name:e?.location_name||null,tripadvisor_web_url:e?.web_url||null}}function n(i,e){if(i.error)throw new Error(`${e}: ${i.error.message}`);return i.data}async function g(i,e,t,l){const o=i.from("user_locations").select("id, is_active").eq("user_id",e).eq("provider",t),a=n(await(l?o.eq("id",l):o.eq("is_active",!0)).maybeSingle(),"Locatie niet leesbaar");if(!a)return;if(n(await i.from("reviews").delete().eq("location_id",a.id),"Reviews van de locatie niet verwijderd"),n(await i.from("user_locations").delete().eq("id",a.id).eq("user_id",e),"Locatie niet verwijderd"),a.is_active){const r=n(await i.from("user_locations").select("id").eq("user_id",e).eq("provider",t).order("created_at",{ascending:!0}).limit(1).maybeSingle(),"Volgende locatie niet leesbaar");r&&n(await i.from("user_locations").update({is_active:!0}).eq("id",r.id),"Volgende locatie niet geactiveerd")}const s=n(await i.from("user_locations").select(_[t]).eq("user_id",e).eq("provider",t).eq("is_active",!0).maybeSingle(),"Actieve locatie niet leesbaar");n(await i.from("profiles").update(m(t,s)).eq("id",e),"Profiel niet bijgewerkt")}export{g as o,w};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.