This commit is contained in:
@@ -4,9 +4,9 @@ import axios from 'axios'
|
||||
import { defineEventHandler, readBody } from 'h3'
|
||||
|
||||
export default defineEventHandler(async (event): Promise<BsbpCreateResponse | { error: string }> => {
|
||||
const merchantId = import.meta.env.BSPB_MERCHANT_ID!
|
||||
const merchantPassword = import.meta.env.BSPB_MERCHANT_PASSWORD!
|
||||
const apiUrl = import.meta.env.BSPB_API_URL!
|
||||
const merchantId = process.env.BSPB_MERCHANT_ID!
|
||||
const merchantPassword = process.env.BSPB_MERCHANT_PASSWORD!
|
||||
const apiUrl = process.env.BSPB_API_URL!
|
||||
|
||||
const assetsStorage = useStorage('assets:server')
|
||||
const bspbKey = await assetsStorage.getItem<string>('pgtest_key.key')
|
||||
|
||||
@@ -5,8 +5,8 @@ import { defineEventHandler, readBody } from 'h3'
|
||||
export default defineEventHandler(async (event): Promise<YandexLocationDetectResponse | { error: string }> => {
|
||||
try {
|
||||
const data = await readBody<YandexLocationDetectRequest>(event)
|
||||
const apiUrl = import.meta.env.VITE_YANDEX_B2B_BASE_URL!
|
||||
const token = import.meta.env.VITE_YANDEX_B2B_TOKEN!
|
||||
const apiUrl = process.env.VITE_YANDEX_B2B_BASE_URL!
|
||||
const token = process.env.VITE_YANDEX_B2B_TOKEN!
|
||||
|
||||
const response = await axios.post<YandexLocationDetectResponse>(
|
||||
`${apiUrl}/location/detect`,
|
||||
|
||||
@@ -5,8 +5,8 @@ import { defineEventHandler, readBody } from 'h3'
|
||||
export default defineEventHandler(async (event): Promise<YandexPvzResponse | { error: string }> => {
|
||||
try {
|
||||
const data = await readBody<YandexPvzRequest>(event)
|
||||
const apiUrl = import.meta.env.VITE_YANDEX_B2B_BASE_URL!
|
||||
const token = import.meta.env.VITE_YANDEX_B2B_TOKEN!
|
||||
const apiUrl = process.env.VITE_YANDEX_B2B_BASE_URL!
|
||||
const token = process.env.VITE_YANDEX_B2B_TOKEN!
|
||||
|
||||
const response = await axios.post<YandexPvzResponse>(
|
||||
`${apiUrl}/pickup-points/list`,
|
||||
|
||||
Reference in New Issue
Block a user