the beginning of the idiots

This commit is contained in:
2025-10-24 14:51:13 -05:00
parent 0b377030c6
commit cb06217ef7
123 changed files with 10279 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?hh // strict
namespace App\Controllers;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
class AuthController
{
public function login(Request $request, Response $response): Response
{
$response->getBody()->write(json_encode(['message' => 'Login endpoint']));
return $response->withHeader('Content-Type', 'application/json');
}
public function logout(Request $request, Response $response): Response
{
$response->getBody()->write(json_encode(['message' => 'Logout endpoint']));
return $response->withHeader('Content-Type', 'application/json');
}
public function register(Request $request, Response $response): Response
{
$response->getBody()->write(json_encode(['message' => 'Register endpoint']));
return $response->withHeader('Content-Type', 'application/json');
}
}

View File

@@ -0,0 +1,15 @@
<?hh // strict
namespace App\Controllers;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
class HomeController
{
public function index(Request $request, Response $response): Response
{
$response->getBody()->write('<h1>Welcome to MerchantsOfHope.org</h1>');
return $response->withHeader('Content-Type', 'text/html');
}
}

View File

@@ -0,0 +1,48 @@
<?hh // strict
namespace App\Controllers;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
class JobController
{
public function listJobs(Request $request, Response $response): Response
{
$response->getBody()->write(json_encode(['message' => 'List jobs endpoint']));
return $response->withHeader('Content-Type', 'application/json');
}
public function getJob(Request $request, Response $response, array $args): Response
{
$jobId = $args['id'];
$response->getBody()->write(json_encode(['message' => 'Get job endpoint', 'id' => $jobId]));
return $response->withHeader('Content-Type', 'application/json');
}
public function myJobs(Request $request, Response $response): Response
{
$response->getBody()->write(json_encode(['message' => 'My jobs endpoint']));
return $response->withHeader('Content-Type', 'application/json');
}
public function createJob(Request $request, Response $response): Response
{
$response->getBody()->write(json_encode(['message' => 'Create job endpoint']));
return $response->withHeader('Content-Type', 'application/json');
}
public function updateJob(Request $request, Response $response, array $args): Response
{
$jobId = $args['id'];
$response->getBody()->write(json_encode(['message' => 'Update job endpoint', 'id' => $jobId]));
return $response->withHeader('Content-Type', 'application/json');
}
public function deleteJob(Request $request, Response $response, array $args): Response
{
$jobId = $args['id'];
$response->getBody()->write(json_encode(['message' => 'Delete job endpoint', 'id' => $jobId]));
return $response->withHeader('Content-Type', 'application/json');
}
}