This commit is contained in:
parent
2456dcaccc
commit
4250cc42db
|
@ -53,7 +53,7 @@ jobs:
|
||||||
- name: Make envfile
|
- name: Make envfile
|
||||||
uses: SpicyPizza/create-envfile@v2.0
|
uses: SpicyPizza/create-envfile@v2.0
|
||||||
with:
|
with:
|
||||||
envkey_PUBLIC_BACKEND_HOST: ${{ vars.PUBLIC_BACKEND_URL }}
|
envkey_PUBLIC_BACKEND_URL: ${{ vars.PUBLIC_BACKEND_URL }}
|
||||||
- name: Build with Astro
|
- name: Build with Astro
|
||||||
run: |
|
run: |
|
||||||
${{ steps.detect-package-manager.outputs.runner }} astro build
|
${{ steps.detect-package-manager.outputs.runner }} astro build
|
||||||
|
|
|
@ -44,10 +44,13 @@ const handleSubmit = async (e: SubmitEvent) => {
|
||||||
|
|
||||||
const formData = new FormData(e.target as HTMLFormElement)
|
const formData = new FormData(e.target as HTMLFormElement)
|
||||||
|
|
||||||
const res = await fetch(`https://konulukonum.log101.dev/api/location`, {
|
const res = await fetch(
|
||||||
|
`${import.meta.env.PUBLIC_BACKEND_URL}/api/location`,
|
||||||
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: formData,
|
body: formData,
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user