Slim API deployment - composer install + full CRUD endpoints
This commit is contained in:
25
www/debug_test.php
Normal file
25
www/debug_test.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
// debug.php - run via CLI on server
|
||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||
$_SERVER['REQUEST_URI'] = '/api/v1/auth/login';
|
||||
$_SERVER['HTTP_HOST'] = 'api.fahrschultermin.de';
|
||||
$_SERVER['HTTPS'] = 'on';
|
||||
|
||||
$config = require __DIR__ . '/config/app.php';
|
||||
|
||||
try {
|
||||
\App\Support\Database::configure($config);
|
||||
|
||||
$userRepo = new \App\Repositories\UserRepository();
|
||||
$user = $userRepo->findByEmail('admin@nordring.test');
|
||||
|
||||
echo "User found: " . ($user ? 'YES' : 'NO') . "\n";
|
||||
if ($user) {
|
||||
echo "Hash: " . substr($user['password_hash'], 0, 20) . "...\n";
|
||||
echo "Verify: " . (password_verify('secret123', $user['password_hash']) ? 'YES' : 'NO') . "\n";
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
echo "ERROR: " . $e->getMessage() . "\n";
|
||||
echo "File: " . $e->getFile() . ":" . $e->getLine() . "\n";
|
||||
echo "Trace: " . $e->getTraceAsString() . "\n";
|
||||
}
|
||||
Reference in New Issue
Block a user