Build 545032stable
Module 912702
823 characters · in e16f15480ab0fbaf.jsDependencies
Source Raw
function(e,t,n){n.d(t,{GI:()=>r,Oo:()=>d,Qm:()=>o,py:()=>a});var i=n(228366),l=n(913122),s=n(306522);let r=async e=>{i.h.dispatch({type:"GUILD_PRODUCTS_FETCH",guildId:e});try{let t=await s.oG(e);i.h.dispatch({type:"GUILD_PRODUCTS_FETCH_SUCCESS",guildId:e,products:t})}catch(t){i.h.dispatch({type:"GUILD_PRODUCTS_FETCH_FAILURE",guildId:e})}},a=async(e,t)=>{i.h.dispatch({type:"GUILD_PRODUCT_FETCH",productId:t});try{let n=await s.bq(e,t);return i.h.dispatch({type:"GUILD_PRODUCT_FETCH_SUCCESS",product:n}),n}catch(e){throw i.h.dispatch({type:"GUILD_PRODUCT_FETCH_FAILURE",productId:t,error:new l.LG(e)}),e}};async function o(e,t,n){let l=await s.Qm(e,t,n);return i.h.dispatch({type:"GUILD_PRODUCT_UPDATE",product:l}),l}async function d(e,t){return await s.Oo(e,t),i.h.dispatch({type:"GUILD_PRODUCT_DELETE",productId:t}),!0}}