fix: changer le pattern de route newsletter (api/ réservé par Kirby)
- Pattern `api/newsletter` → `newsletter/subscribe` - Ajout de config.localhost.php (gitignored) pour le dev local Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9c9a2fd40a
commit
c34a564aa5
3 changed files with 3 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -53,6 +53,7 @@ Icon
|
|||
# ---------------
|
||||
|
||||
/site/config/config.index.ngo.php
|
||||
/site/config/config.localhost.php
|
||||
|
||||
|
||||
# Content
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
|
||||
const PROXY_URL = '/api/newsletter';
|
||||
const PROXY_URL = '/newsletter/subscribe';
|
||||
|
||||
async function subscribeToNewsletter(email, attributes = {}) {
|
||||
const response = await fetch(PROXY_URL, {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'pattern' => 'api/newsletter',
|
||||
'pattern' => 'newsletter/subscribe',
|
||||
'method' => 'POST|OPTIONS',
|
||||
'action' => function () {
|
||||
header('Content-Type: application/json');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue