Новые изменения в компонеты
This commit is contained in:
parent
d3d3ad92c3
commit
3411dd4931
17 changed files with 99 additions and 58 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import type { APIRoute } from 'astro';
|
||||
import crypto from 'crypto';
|
||||
|
||||
const POCKETBASE_URL = import.meta.env.POCKETBASE_URL || 'http://127.0.0.1:8090';
|
||||
const PB_POCKETBASE_URL = import.meta.env.PB_POCKETBASE_URL || 'http://127.0.0.1:8090';
|
||||
|
||||
const POCKETBASE_ID_REGEX = /^[a-z0-9]{15}$/;
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ function generateVisitorHash(ip: string, userAgent: string): string {
|
|||
}
|
||||
|
||||
async function pbRequest(method: string, path: string, body?: object) {
|
||||
const url = `${POCKETBASE_URL}${path}`;
|
||||
const url = `${PB_POCKETBASE_URL}${path}`;
|
||||
const options: RequestInit = {
|
||||
method,
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue