fix(apps/web): actions getCustomer
This commit is contained in:
parent
e31953ba57
commit
f1f1ac3183
@ -10,8 +10,7 @@ export async function updateProfile(input: CustomerInput) {
|
||||
|
||||
if (session) {
|
||||
const { user } = session;
|
||||
const getCustomerResponse = await getCustomer({ telegramId: user?.telegramId });
|
||||
const customer = getCustomerResponse.data.customers.at(0);
|
||||
const customer = await getCustomer({ telegramId: user?.telegramId });
|
||||
if (customer) {
|
||||
await updateCustomerProfile({
|
||||
data: input,
|
||||
@ -28,8 +27,7 @@ export async function updateRole(role: Enum_Customer_Role) {
|
||||
|
||||
if (session) {
|
||||
const { user } = session;
|
||||
const getCustomerResponse = await getCustomer({ telegramId: user?.telegramId });
|
||||
const customer = getCustomerResponse.data.customers.at(0);
|
||||
const customer = await getCustomer({ telegramId: user?.telegramId });
|
||||
if (customer) {
|
||||
await updateCustomerProfile({
|
||||
data: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user