Compare commits
No commits in common. "1f89c5cd8140cc08bef24f0a7299bd204c82e889" and "acf877f325ee1779be7111fc0ab07e007734fb8b" have entirely different histories.
1f89c5cd81
...
acf877f325
6 changed files with 11 additions and 119 deletions
|
|
@ -169,27 +169,15 @@ frontend/
|
||||||
|
|
||||||
## API-эндпоинты
|
## API-эндпоинты
|
||||||
|
|
||||||
### Auth
|
- `/api/auth/login` — вход
|
||||||
- `/api/auth/login` — вход (POST)
|
- `/api/auth/register` — регистрация
|
||||||
- `/api/auth/register` — регистрация (POST)
|
- `/api/auth/logout` — выход
|
||||||
- `/api/auth/logout` — выход (POST)
|
- `/api/auth/check-auth` — проверка авторизации
|
||||||
- `/api/auth/sign-out` — выход (POST, alias)
|
- `/api/auth/google/*` — Google OAuth
|
||||||
- `/api/auth/check-auth` — проверка авторизации (GET)
|
- `/api/contact` — контактная форма
|
||||||
- `/api/auth/send-email` — отправка email (POST)
|
- `/api/reviews` — отзывы (GET/POST/DELETE)
|
||||||
- `/api/auth/send-admin-notification` — уведомление админа (POST)
|
- `/api/send-booking` — бронирование
|
||||||
- `/api/auth/send-booking-confirmation` — подтверждение брони (POST)
|
- `/api/files-proxy/*` — прокси файлов
|
||||||
- `/api/auth/google/index` — Google OAuth инициация (GET)
|
|
||||||
- `/api/auth/google/callback` — Google OAuth callback (GET)
|
|
||||||
|
|
||||||
### Public
|
|
||||||
- `/api/contact` — контактная форма (POST)
|
|
||||||
- `/api/send-booking` — бронирование (POST)
|
|
||||||
- `/api/files-proxy/[collectionName]/[recordId]/[filename]` — прокси файлов (GET)
|
|
||||||
|
|
||||||
### Reviews
|
|
||||||
- `/api/reviews` — GET все отзывы, POST создать, DELETE удалить
|
|
||||||
- `/api/reviews/[id]` — GET/DELETE один отзыв
|
|
||||||
- `/api/reviews/latest-reviews` — GET последние отзывы
|
|
||||||
|
|
||||||
## Переменные окружения
|
## Переменные окружения
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"build": "astro build",
|
"build": "astro build",
|
||||||
"postbuild": "node scripts/copy-sitemap.mjs",
|
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
"astro": "astro"
|
"astro": "astro"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -8,5 +8,4 @@ Disallow: /email-verified
|
||||||
Disallow: /profile
|
Disallow: /profile
|
||||||
Disallow: /auth/
|
Disallow: /auth/
|
||||||
|
|
||||||
Sitemap: https://minivan-berlin.de/sitemap-index.xml
|
Sitemap: https://minivan-berlin.de/sitemap-index.xml
|
||||||
Sitemap: https://minivan-berlin.de/sitemap.xml
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
import { cpSync, existsSync } from 'node:fs';
|
|
||||||
import { resolve, dirname } from 'node:path';
|
|
||||||
import { fileURLToPath } from 'node:url';
|
|
||||||
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
||||||
const distDir = resolve(__dirname, '..', 'dist', 'client');
|
|
||||||
|
|
||||||
const source = resolve(distDir, 'sitemap-0.xml');
|
|
||||||
const target = resolve(distDir, 'sitemap.xml');
|
|
||||||
|
|
||||||
if (existsSync(source)) {
|
|
||||||
cpSync(source, target);
|
|
||||||
console.log('✅ sitemap.xml created');
|
|
||||||
} else {
|
|
||||||
console.error('❌ sitemap-0.xml not found');
|
|
||||||
}
|
|
||||||
12
frontend/src/env.d.ts
vendored
12
frontend/src/env.d.ts
vendored
|
|
@ -12,8 +12,6 @@ interface ImportMetaEnv {
|
||||||
readonly MAIL_PORT: string;
|
readonly MAIL_PORT: string;
|
||||||
readonly MAIL_FROM: string;
|
readonly MAIL_FROM: string;
|
||||||
readonly ADMIN_EMAIL: string;
|
readonly ADMIN_EMAIL: string;
|
||||||
readonly SENDER_EMAIL: string;
|
|
||||||
readonly PROD: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ImportMeta {
|
interface ImportMeta {
|
||||||
|
|
@ -24,14 +22,6 @@ interface ImportMeta {
|
||||||
declare namespace App {
|
declare namespace App {
|
||||||
interface Locals {
|
interface Locals {
|
||||||
pb: PocketBase;
|
pb: PocketBase;
|
||||||
user: RecordModel | null;
|
user: RecordModel | undefined;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. Расширение window для глобальных функций
|
|
||||||
declare global {
|
|
||||||
interface Window {
|
|
||||||
closeModal?: (modalId: string) => void;
|
|
||||||
currentSelectedCar?: unknown;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -27,37 +27,6 @@ export interface Car extends BaseRecord {
|
||||||
max_passengers: number;
|
max_passengers: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Интерфейсы для пользователей
|
|
||||||
export interface User extends BaseRecord {
|
|
||||||
username: string;
|
|
||||||
email: string;
|
|
||||||
name: string;
|
|
||||||
avatar?: string;
|
|
||||||
phone?: string;
|
|
||||||
is_verified: boolean;
|
|
||||||
emailVisibility?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Интерфейсы для бронирований
|
|
||||||
export interface Booking extends BaseRecord {
|
|
||||||
customer_name: string;
|
|
||||||
customer_email: string;
|
|
||||||
customer_phone: string;
|
|
||||||
pickup_location: string;
|
|
||||||
dropoff_location: string;
|
|
||||||
pickup_date: string;
|
|
||||||
pickup_time: string;
|
|
||||||
dropoff_date?: string;
|
|
||||||
dropoff_time?: string;
|
|
||||||
passengers: number;
|
|
||||||
vehicle_id?: string;
|
|
||||||
vehicle_name?: string;
|
|
||||||
message?: string;
|
|
||||||
status: 'pending' | 'confirmed' | 'cancelled' | 'completed';
|
|
||||||
total_price?: string;
|
|
||||||
created: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SliderCar extends BaseRecord {
|
export interface SliderCar extends BaseRecord {
|
||||||
brand: string;
|
brand: string;
|
||||||
model: string;
|
model: string;
|
||||||
|
|
@ -163,43 +132,6 @@ export interface Review extends BaseRecord {
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Интерфейсы для постов блога
|
|
||||||
export interface BlogPost extends BaseRecord {
|
|
||||||
title: string;
|
|
||||||
slug: string;
|
|
||||||
excerpt: string;
|
|
||||||
content: string;
|
|
||||||
content_html?: string;
|
|
||||||
image: string;
|
|
||||||
alt_text?: string;
|
|
||||||
author: string;
|
|
||||||
author_name?: string;
|
|
||||||
author_avatar?: string;
|
|
||||||
published: boolean;
|
|
||||||
publish_date: string;
|
|
||||||
views: number;
|
|
||||||
tags: string[];
|
|
||||||
category?: string;
|
|
||||||
featured: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Post = BlogPost;
|
|
||||||
|
|
||||||
// Интерфейсы для комментариев блога
|
|
||||||
export interface Comment extends BaseRecord {
|
|
||||||
post_id: string;
|
|
||||||
author_name: string;
|
|
||||||
author_email: string;
|
|
||||||
author_avatar?: string;
|
|
||||||
content: string;
|
|
||||||
parent_id?: string;
|
|
||||||
reply_to?: string;
|
|
||||||
is_verified: boolean;
|
|
||||||
is_spam: boolean;
|
|
||||||
is_published: boolean;
|
|
||||||
created: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Интерфейс для отзыва в LatestReviews
|
// Интерфейс для отзыва в LatestReviews
|
||||||
export interface LatestReview {
|
export interface LatestReview {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue